{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T07:39:19.220544Z",
     "start_time": "2018-11-16T07:39:18.509451Z"
    }
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "from IPython.core.interactiveshell import InteractiveShell\n",
    "InteractiveShell.ast_node_interactivity = \"all\"\n",
    "\n",
    "import os\n",
    "import ast\n",
    "import datetime as dt\n",
    "import matplotlib.pyplot as plt\n",
    "plt.rcParams['figure.figsize'] = [16, 10]\n",
    "plt.rcParams['font.size'] = 14\n",
    "\n",
    "import seaborn as sns\n",
    "import cv2\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "import glob\n",
    "\n",
    "import numpy as np\n",
    "from PIL import Image, ImageDraw\n",
    "\n",
    "from sklearn.preprocessing import LabelEncoder\n",
    "\n",
    "import logging\n",
    "# logging.basicConfig(filename='example.log',level=logging.DEBUG)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T07:39:21.463667Z",
     "start_time": "2018-11-16T07:39:19.294110Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('Reading...', '../input/train_simplified/eye.csv')\n",
      "('Reading...', '../input/train_simplified/castle.csv')\n",
      "('Reading...', '../input/train_simplified/pizza.csv')\n",
      "('Reading...', '../input/train_simplified/umbrella.csv')\n",
      "('Reading...', '../input/train_simplified/bat.csv')\n",
      "('Reading...', '../input/train_simplified/hot tub.csv')\n",
      "('Reading...', '../input/train_simplified/diving board.csv')\n",
      "('Reading...', '../input/train_simplified/wine bottle.csv')\n",
      "('Reading...', '../input/train_simplified/butterfly.csv')\n",
      "('Reading...', '../input/train_simplified/bread.csv')\n",
      "('Reading...', '../input/train_simplified/television.csv')\n",
      "('Reading...', '../input/train_simplified/peas.csv')\n",
      "('Reading...', '../input/train_simplified/binoculars.csv')\n",
      "('Reading...', '../input/train_simplified/basket.csv')\n",
      "('Reading...', '../input/train_simplified/steak.csv')\n",
      "('Reading...', '../input/train_simplified/eyeglasses.csv')\n",
      "('Reading...', '../input/train_simplified/backpack.csv')\n",
      "('Reading...', '../input/train_simplified/teddy-bear.csv')\n",
      "('Reading...', '../input/train_simplified/grass.csv')\n",
      "('Reading...', '../input/train_simplified/canoe.csv')\n",
      "('Reading...', '../input/train_simplified/power outlet.csv')\n",
      "('Reading...', '../input/train_simplified/car.csv')\n",
      "('Reading...', '../input/train_simplified/keyboard.csv')\n",
      "('Reading...', '../input/train_simplified/parachute.csv')\n",
      "('Reading...', '../input/train_simplified/spreadsheet.csv')\n",
      "('Reading...', '../input/train_simplified/snowflake.csv')\n",
      "('Reading...', '../input/train_simplified/pond.csv')\n",
      "('Reading...', '../input/train_simplified/airplane.csv')\n",
      "('Reading...', '../input/train_simplified/postcard.csv')\n",
      "('Reading...', '../input/train_simplified/lobster.csv')\n",
      "('Reading...', '../input/train_simplified/peanut.csv')\n",
      "('Reading...', '../input/train_simplified/broom.csv')\n",
      "('Reading...', '../input/train_simplified/mouse.csv')\n",
      "('Reading...', '../input/train_simplified/bathtub.csv')\n",
      "('Reading...', '../input/train_simplified/hot dog.csv')\n",
      "('Reading...', '../input/train_simplified/chandelier.csv')\n",
      "('Reading...', '../input/train_simplified/cat.csv')\n",
      "('Reading...', '../input/train_simplified/cello.csv')\n",
      "('Reading...', '../input/train_simplified/scissors.csv')\n",
      "('Reading...', '../input/train_simplified/horse.csv')\n",
      "('Reading...', '../input/train_simplified/bed.csv')\n",
      "('Reading...', '../input/train_simplified/tractor.csv')\n",
      "('Reading...', '../input/train_simplified/pliers.csv')\n",
      "('Reading...', '../input/train_simplified/chair.csv')\n",
      "('Reading...', '../input/train_simplified/baseball.csv')\n",
      "('Reading...', '../input/train_simplified/paintbrush.csv')\n",
      "('Reading...', '../input/train_simplified/stereo.csv')\n",
      "('Reading...', '../input/train_simplified/bulldozer.csv')\n",
      "('Reading...', '../input/train_simplified/rhinoceros.csv')\n",
      "('Reading...', '../input/train_simplified/sandwich.csv')\n",
      "('Reading...', '../input/train_simplified/vase.csv')\n",
      "('Reading...', '../input/train_simplified/campfire.csv')\n",
      "('Reading...', '../input/train_simplified/basketball.csv')\n",
      "('Reading...', '../input/train_simplified/coffee cup.csv')\n",
      "('Reading...', '../input/train_simplified/sleeping bag.csv')\n",
      "('Reading...', '../input/train_simplified/streetlight.csv')\n",
      "('Reading...', '../input/train_simplified/zebra.csv')\n",
      "('Reading...', '../input/train_simplified/see saw.csv')\n",
      "('Reading...', '../input/train_simplified/axe.csv')\n",
      "('Reading...', '../input/train_simplified/hedgehog.csv')\n",
      "('Reading...', '../input/train_simplified/radio.csv')\n",
      "('Reading...', '../input/train_simplified/grapes.csv')\n",
      "('Reading...', '../input/train_simplified/soccer ball.csv')\n",
      "('Reading...', '../input/train_simplified/ceiling fan.csv')\n",
      "('Reading...', '../input/train_simplified/skyscraper.csv')\n",
      "('Reading...', '../input/train_simplified/frog.csv')\n",
      "('Reading...', '../input/train_simplified/snail.csv')\n",
      "('Reading...', '../input/train_simplified/dresser.csv')\n",
      "('Reading...', '../input/train_simplified/goatee.csv')\n",
      "('Reading...', '../input/train_simplified/sink.csv')\n",
      "('Reading...', '../input/train_simplified/apple.csv')\n",
      "('Reading...', '../input/train_simplified/The Mona Lisa.csv')\n",
      "('Reading...', '../input/train_simplified/house.csv')\n",
      "('Reading...', '../input/train_simplified/hexagon.csv')\n",
      "('Reading...', '../input/train_simplified/circle.csv')\n",
      "('Reading...', '../input/train_simplified/rain.csv')\n",
      "('Reading...', '../input/train_simplified/boomerang.csv')\n",
      "('Reading...', '../input/train_simplified/train.csv')\n",
      "('Reading...', '../input/train_simplified/kangaroo.csv')\n",
      "('Reading...', '../input/train_simplified/rake.csv')\n",
      "('Reading...', '../input/train_simplified/arm.csv')\n",
      "('Reading...', '../input/train_simplified/headphones.csv')\n",
      "('Reading...', '../input/train_simplified/cooler.csv')\n",
      "('Reading...', '../input/train_simplified/sock.csv')\n",
      "('Reading...', '../input/train_simplified/rainbow.csv')\n",
      "('Reading...', '../input/train_simplified/cloud.csv')\n",
      "('Reading...', '../input/train_simplified/hockey puck.csv')\n",
      "('Reading...', '../input/train_simplified/bird.csv')\n",
      "('Reading...', '../input/train_simplified/bottlecap.csv')\n",
      "('Reading...', '../input/train_simplified/stove.csv')\n",
      "('Reading...', '../input/train_simplified/bowtie.csv')\n",
      "('Reading...', '../input/train_simplified/duck.csv')\n",
      "('Reading...', '../input/train_simplified/carrot.csv')\n",
      "('Reading...', '../input/train_simplified/skateboard.csv')\n",
      "('Reading...', '../input/train_simplified/hot air balloon.csv')\n",
      "('Reading...', '../input/train_simplified/onion.csv')\n",
      "('Reading...', '../input/train_simplified/hockey stick.csv')\n",
      "('Reading...', '../input/train_simplified/house plant.csv')\n",
      "('Reading...', '../input/train_simplified/underwear.csv')\n",
      "('Reading...', '../input/train_simplified/shovel.csv')\n",
      "('Reading...', '../input/train_simplified/picture frame.csv')\n",
      "('Reading...', '../input/train_simplified/pool.csv')\n",
      "('Reading...', '../input/train_simplified/camouflage.csv')\n",
      "('Reading...', '../input/train_simplified/elephant.csv')\n",
      "('Reading...', '../input/train_simplified/stitches.csv')\n",
      "('Reading...', '../input/train_simplified/whale.csv')\n",
      "('Reading...', '../input/train_simplified/sun.csv')\n",
      "('Reading...', '../input/train_simplified/moon.csv')\n",
      "('Reading...', '../input/train_simplified/broccoli.csv')\n",
      "('Reading...', '../input/train_simplified/rabbit.csv')\n",
      "('Reading...', '../input/train_simplified/rollerskates.csv')\n",
      "('Reading...', '../input/train_simplified/fence.csv')\n",
      "('Reading...', '../input/train_simplified/squirrel.csv')\n",
      "('Reading...', '../input/train_simplified/feather.csv')\n",
      "('Reading...', '../input/train_simplified/roller coaster.csv')\n",
      "('Reading...', '../input/train_simplified/door.csv')\n",
      "('Reading...', '../input/train_simplified/flamingo.csv')\n",
      "('Reading...', '../input/train_simplified/popsicle.csv')\n",
      "('Reading...', '../input/train_simplified/waterslide.csv')\n",
      "('Reading...', '../input/train_simplified/fireplace.csv')\n",
      "('Reading...', '../input/train_simplified/hamburger.csv')\n",
      "('Reading...', '../input/train_simplified/windmill.csv')\n",
      "('Reading...', '../input/train_simplified/bus.csv')\n",
      "('Reading...', '../input/train_simplified/sweater.csv')\n",
      "('Reading...', '../input/train_simplified/snake.csv')\n",
      "('Reading...', '../input/train_simplified/river.csv')\n",
      "('Reading...', '../input/train_simplified/drums.csv')\n",
      "('Reading...', '../input/train_simplified/garden.csv')\n",
      "('Reading...', '../input/train_simplified/clock.csv')\n",
      "('Reading...', '../input/train_simplified/bear.csv')\n",
      "('Reading...', '../input/train_simplified/baseball bat.csv')\n",
      "('Reading...', '../input/train_simplified/bicycle.csv')\n",
      "('Reading...', '../input/train_simplified/fire hydrant.csv')\n",
      "('Reading...', '../input/train_simplified/crocodile.csv')\n",
      "('Reading...', '../input/train_simplified/parrot.csv')\n",
      "('Reading...', '../input/train_simplified/angel.csv')\n",
      "('Reading...', '../input/train_simplified/octagon.csv')\n",
      "('Reading...', '../input/train_simplified/giraffe.csv')\n",
      "('Reading...', '../input/train_simplified/calculator.csv')\n",
      "('Reading...', '../input/train_simplified/bush.csv')\n",
      "('Reading...', '../input/train_simplified/pineapple.csv')\n",
      "('Reading...', '../input/train_simplified/dragon.csv')\n",
      "('Reading...', '../input/train_simplified/tent.csv')\n",
      "('Reading...', '../input/train_simplified/paper clip.csv')\n",
      "('Reading...', '../input/train_simplified/snorkel.csv')\n",
      "('Reading...', '../input/train_simplified/shorts.csv')\n",
      "('Reading...', '../input/train_simplified/tornado.csv')\n",
      "('Reading...', '../input/train_simplified/beard.csv')\n",
      "('Reading...', '../input/train_simplified/hand.csv')\n",
      "('Reading...', '../input/train_simplified/moustache.csv')\n",
      "('Reading...', '../input/train_simplified/screwdriver.csv')\n",
      "('Reading...', '../input/train_simplified/nose.csv')\n",
      "('Reading...', '../input/train_simplified/eraser.csv')\n",
      "('Reading...', '../input/train_simplified/truck.csv')\n",
      "('Reading...', '../input/train_simplified/sea turtle.csv')\n",
      "('Reading...', '../input/train_simplified/penguin.csv')\n",
      "('Reading...', '../input/train_simplified/ant.csv')\n",
      "('Reading...', '../input/train_simplified/motorbike.csv')\n",
      "('Reading...', '../input/train_simplified/tree.csv')\n",
      "('Reading...', '../input/train_simplified/camel.csv')\n",
      "('Reading...', '../input/train_simplified/toe.csv')\n",
      "('Reading...', '../input/train_simplified/pillow.csv')\n",
      "('Reading...', '../input/train_simplified/yoga.csv')\n",
      "('Reading...', '../input/train_simplified/lantern.csv')\n",
      "('Reading...', '../input/train_simplified/potato.csv')\n",
      "('Reading...', '../input/train_simplified/cruise ship.csv')\n",
      "('Reading...', '../input/train_simplified/pickup truck.csv')\n",
      "('Reading...', '../input/train_simplified/pig.csv')\n",
      "('Reading...', '../input/train_simplified/foot.csv')\n",
      "('Reading...', '../input/train_simplified/mosquito.csv')\n",
      "('Reading...', '../input/train_simplified/tiger.csv')\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('Reading...', '../input/train_simplified/octopus.csv')\n",
      "('Reading...', '../input/train_simplified/diamond.csv')\n",
      "('Reading...', '../input/train_simplified/wine glass.csv')\n",
      "('Reading...', '../input/train_simplified/crab.csv')\n",
      "('Reading...', '../input/train_simplified/blackberry.csv')\n",
      "('Reading...', '../input/train_simplified/submarine.csv')\n",
      "('Reading...', '../input/train_simplified/bee.csv')\n",
      "('Reading...', '../input/train_simplified/The Eiffel Tower.csv')\n",
      "('Reading...', '../input/train_simplified/finger.csv')\n",
      "('Reading...', '../input/train_simplified/belt.csv')\n",
      "('Reading...', '../input/train_simplified/jail.csv')\n",
      "('Reading...', '../input/train_simplified/bracelet.csv')\n",
      "('Reading...', '../input/train_simplified/megaphone.csv')\n",
      "('Reading...', '../input/train_simplified/saw.csv')\n",
      "('Reading...', '../input/train_simplified/microwave.csv')\n",
      "('Reading...', '../input/train_simplified/pants.csv')\n",
      "('Reading...', '../input/train_simplified/The Great Wall of China.csv')\n",
      "('Reading...', '../input/train_simplified/mermaid.csv')\n",
      "('Reading...', '../input/train_simplified/ear.csv')\n",
      "('Reading...', '../input/train_simplified/firetruck.csv')\n",
      "('Reading...', '../input/train_simplified/ocean.csv')\n",
      "('Reading...', '../input/train_simplified/birthday cake.csv')\n",
      "('Reading...', '../input/train_simplified/table.csv')\n",
      "('Reading...', '../input/train_simplified/star.csv')\n",
      "('Reading...', '../input/train_simplified/cannon.csv')\n",
      "('Reading...', '../input/train_simplified/envelope.csv')\n",
      "('Reading...', '../input/train_simplified/skull.csv')\n",
      "('Reading...', '../input/train_simplified/beach.csv')\n",
      "('Reading...', '../input/train_simplified/cactus.csv')\n",
      "('Reading...', '../input/train_simplified/alarm clock.csv')\n",
      "('Reading...', '../input/train_simplified/shoe.csv')\n",
      "('Reading...', '../input/train_simplified/map.csv')\n",
      "('Reading...', '../input/train_simplified/nail.csv')\n",
      "('Reading...', '../input/train_simplified/stairs.csv')\n",
      "('Reading...', '../input/train_simplified/blueberry.csv')\n",
      "('Reading...', '../input/train_simplified/mailbox.csv')\n",
      "('Reading...', '../input/train_simplified/remote control.csv')\n",
      "('Reading...', '../input/train_simplified/hourglass.csv')\n",
      "('Reading...', '../input/train_simplified/trombone.csv')\n",
      "('Reading...', '../input/train_simplified/watermelon.csv')\n",
      "('Reading...', '../input/train_simplified/suitcase.csv')\n",
      "('Reading...', '../input/train_simplified/telephone.csv')\n",
      "('Reading...', '../input/train_simplified/golf club.csv')\n",
      "('Reading...', '../input/train_simplified/sword.csv')\n",
      "('Reading...', '../input/train_simplified/bridge.csv')\n",
      "('Reading...', '../input/train_simplified/brain.csv')\n",
      "('Reading...', '../input/train_simplified/helmet.csv')\n",
      "('Reading...', '../input/train_simplified/spoon.csv')\n",
      "('Reading...', '../input/train_simplified/dishwasher.csv')\n",
      "('Reading...', '../input/train_simplified/hospital.csv')\n",
      "('Reading...', '../input/train_simplified/couch.csv')\n",
      "('Reading...', '../input/train_simplified/donut.csv')\n",
      "('Reading...', '../input/train_simplified/traffic light.csv')\n",
      "('Reading...', '../input/train_simplified/barn.csv')\n",
      "('Reading...', '../input/train_simplified/banana.csv')\n",
      "('Reading...', '../input/train_simplified/squiggle.csv')\n",
      "('Reading...', '../input/train_simplified/wheel.csv')\n",
      "('Reading...', '../input/train_simplified/necklace.csv')\n",
      "('Reading...', '../input/train_simplified/violin.csv')\n",
      "('Reading...', '../input/train_simplified/hurricane.csv')\n",
      "('Reading...', '../input/train_simplified/matches.csv')\n",
      "('Reading...', '../input/train_simplified/crown.csv')\n",
      "('Reading...', '../input/train_simplified/candle.csv')\n",
      "('Reading...', '../input/train_simplified/bucket.csv')\n",
      "('Reading...', '../input/train_simplified/anvil.csv')\n",
      "('Reading...', '../input/train_simplified/dumbbell.csv')\n",
      "('Reading...', '../input/train_simplified/fork.csv')\n",
      "('Reading...', '../input/train_simplified/toothpaste.csv')\n",
      "('Reading...', '../input/train_simplified/compass.csv')\n",
      "('Reading...', '../input/train_simplified/key.csv')\n",
      "('Reading...', '../input/train_simplified/strawberry.csv')\n",
      "('Reading...', '../input/train_simplified/teapot.csv')\n",
      "('Reading...', '../input/train_simplified/pencil.csv')\n",
      "('Reading...', '../input/train_simplified/light bulb.csv')\n",
      "('Reading...', '../input/train_simplified/sheep.csv')\n",
      "('Reading...', '../input/train_simplified/helicopter.csv')\n",
      "('Reading...', '../input/train_simplified/smiley face.csv')\n",
      "('Reading...', '../input/train_simplified/van.csv')\n",
      "('Reading...', '../input/train_simplified/dolphin.csv')\n",
      "('Reading...', '../input/train_simplified/spider.csv')\n",
      "('Reading...', '../input/train_simplified/fish.csv')\n",
      "('Reading...', '../input/train_simplified/toothbrush.csv')\n",
      "('Reading...', '../input/train_simplified/marker.csv')\n",
      "('Reading...', '../input/train_simplified/flying saucer.csv')\n",
      "('Reading...', '../input/train_simplified/cookie.csv')\n",
      "('Reading...', '../input/train_simplified/scorpion.csv')\n",
      "('Reading...', '../input/train_simplified/palm tree.csv')\n",
      "('Reading...', '../input/train_simplified/toaster.csv')\n",
      "('Reading...', '../input/train_simplified/sailboat.csv')\n",
      "('Reading...', '../input/train_simplified/asparagus.csv')\n",
      "('Reading...', '../input/train_simplified/pear.csv')\n",
      "('Reading...', '../input/train_simplified/elbow.csv')\n",
      "('Reading...', '../input/train_simplified/cup.csv')\n",
      "('Reading...', '../input/train_simplified/dog.csv')\n",
      "('Reading...', '../input/train_simplified/piano.csv')\n",
      "('Reading...', '../input/train_simplified/mushroom.csv')\n",
      "('Reading...', '../input/train_simplified/snowman.csv')\n",
      "('Reading...', '../input/train_simplified/line.csv')\n",
      "('Reading...', '../input/train_simplified/mouth.csv')\n",
      "('Reading...', '../input/train_simplified/calendar.csv')\n",
      "('Reading...', '../input/train_simplified/saxophone.csv')\n",
      "('Reading...', '../input/train_simplified/paint can.csv')\n",
      "('Reading...', '../input/train_simplified/panda.csv')\n",
      "('Reading...', '../input/train_simplified/hat.csv')\n",
      "('Reading...', '../input/train_simplified/drill.csv')\n",
      "('Reading...', '../input/train_simplified/leg.csv')\n",
      "('Reading...', '../input/train_simplified/knee.csv')\n",
      "('Reading...', '../input/train_simplified/lightning.csv')\n",
      "('Reading...', '../input/train_simplified/ice cream.csv')\n",
      "('Reading...', '../input/train_simplified/hammer.csv')\n",
      "('Reading...', '../input/train_simplified/frying pan.csv')\n",
      "('Reading...', '../input/train_simplified/camera.csv')\n",
      "('Reading...', '../input/train_simplified/mountain.csv')\n",
      "('Reading...', '../input/train_simplified/flip flops.csv')\n",
      "('Reading...', '../input/train_simplified/shark.csv')\n",
      "('Reading...', '../input/train_simplified/swing set.csv')\n",
      "('Reading...', '../input/train_simplified/bench.csv')\n",
      "('Reading...', '../input/train_simplified/string bean.csv')\n",
      "('Reading...', '../input/train_simplified/ladder.csv')\n",
      "('Reading...', '../input/train_simplified/cake.csv')\n",
      "('Reading...', '../input/train_simplified/jacket.csv')\n",
      "('Reading...', '../input/train_simplified/flower.csv')\n",
      "('Reading...', '../input/train_simplified/fan.csv')\n",
      "('Reading...', '../input/train_simplified/laptop.csv')\n",
      "('Reading...', '../input/train_simplified/cell phone.csv')\n",
      "('Reading...', '../input/train_simplified/mug.csv')\n",
      "('Reading...', '../input/train_simplified/stethoscope.csv')\n",
      "('Reading...', '../input/train_simplified/guitar.csv')\n",
      "('Reading...', '../input/train_simplified/tooth.csv')\n",
      "('Reading...', '../input/train_simplified/square.csv')\n",
      "('Reading...', '../input/train_simplified/lipstick.csv')\n",
      "('Reading...', '../input/train_simplified/purse.csv')\n",
      "('Reading...', '../input/train_simplified/raccoon.csv')\n",
      "('Reading...', '../input/train_simplified/passport.csv')\n",
      "('Reading...', '../input/train_simplified/oven.csv')\n",
      "('Reading...', '../input/train_simplified/book.csv')\n",
      "('Reading...', '../input/train_simplified/clarinet.csv')\n",
      "('Reading...', '../input/train_simplified/crayon.csv')\n",
      "('Reading...', '../input/train_simplified/face.csv')\n",
      "('Reading...', '../input/train_simplified/church.csv')\n",
      "('Reading...', '../input/train_simplified/stop sign.csv')\n",
      "('Reading...', '../input/train_simplified/microphone.csv')\n",
      "('Reading...', '../input/train_simplified/lollipop.csv')\n",
      "('Reading...', '../input/train_simplified/swan.csv')\n",
      "('Reading...', '../input/train_simplified/leaf.csv')\n",
      "('Reading...', '../input/train_simplified/computer.csv')\n",
      "('Reading...', '../input/train_simplified/lion.csv')\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "('Reading...', '../input/train_simplified/lighthouse.csv')\n",
      "('Reading...', '../input/train_simplified/t-shirt.csv')\n",
      "('Reading...', '../input/train_simplified/ambulance.csv')\n",
      "('Reading...', '../input/train_simplified/washing machine.csv')\n",
      "('Reading...', '../input/train_simplified/police car.csv')\n",
      "('Reading...', '../input/train_simplified/garden hose.csv')\n",
      "('Reading...', '../input/train_simplified/owl.csv')\n",
      "('Reading...', '../input/train_simplified/school bus.csv')\n",
      "('Reading...', '../input/train_simplified/cow.csv')\n",
      "('Reading...', '../input/train_simplified/triangle.csv')\n",
      "('Reading...', '../input/train_simplified/toilet.csv')\n",
      "('Reading...', '../input/train_simplified/monkey.csv')\n",
      "('Reading...', '../input/train_simplified/wristwatch.csv')\n",
      "('Reading...', '../input/train_simplified/floor lamp.csv')\n",
      "('Reading...', '../input/train_simplified/bandage.csv')\n",
      "('Reading...', '../input/train_simplified/harp.csv')\n",
      "('Reading...', '../input/train_simplified/flashlight.csv')\n",
      "('Reading...', '../input/train_simplified/tennis racquet.csv')\n",
      "('Reading...', '../input/train_simplified/trumpet.csv')\n",
      "('Reading...', '../input/train_simplified/zigzag.csv')\n",
      "('Reading...', '../input/train_simplified/animal migration.csv')\n",
      "('Reading...', '../input/train_simplified/speedboat.csv')\n"
     ]
    }
   ],
   "source": [
    "CLASSES_CSV = glob.glob('../input/train_simplified/*.csv')\n",
    "CLASSES = [x.split('/')[-1][:-4] for x in CLASSES_CSV]\n",
    "\n",
    "# 读取单个csv文件\n",
    "def read_df(path, nrows):\n",
    "    print('Reading...', path)\n",
    "    if isinstance(nrows, int):\n",
    "        return pd.read_csv(path, nrows=nrows, parse_dates=['timestamp'])\n",
    "    else:\n",
    "        return pd.read_csv(path, parse_dates=['timestamp'])\n",
    "\n",
    "# 读取多个csv文件\n",
    "def contcat_df(paths, nrows):\n",
    "    dfs = []\n",
    "    for path in paths:\n",
    "        dfs.append(read_df(path, nrows))\n",
    "    return pd.concat(dfs, axis=0, ignore_index=True)\n",
    "\n",
    "df = contcat_df(CLASSES_CSV, 500)\n",
    "df = df.reindex(np.random.permutation(df.index))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T07:39:24.832634Z",
     "start_time": "2018-11-16T07:39:24.567771Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "lbl = LabelEncoder().fit(df['word'])\n",
    "df['word'] = lbl.transform(df['word'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T07:39:44.215995Z",
     "start_time": "2018-11-16T07:39:25.883619Z"
    }
   },
   "outputs": [],
   "source": [
    "df_train = pd.read_pickle(os.path.join('./data', 'train_50000' + '.pkl'))\n",
    "df_val = pd.read_pickle(os.path.join('./data', 'val_all' + '.pkl'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T07:39:44.299180Z",
     "start_time": "2018-11-16T07:39:44.219831Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "import torch\n",
    "import torchvision.models as models\n",
    "import torchvision.transforms as transforms\n",
    "import torchvision.datasets as datasets\n",
    "import torch.nn as nn\n",
    "import torch.optim as optim\n",
    "from torch.autograd import Variable\n",
    "from torch.utils.data.dataset import Dataset\n",
    "\n",
    "def draw_cv2(raw_strokes, size=256, lw=6, time_color=True):\n",
    "    BASE_SIZE = 299\n",
    "    img = np.zeros((BASE_SIZE, BASE_SIZE), np.uint8)\n",
    "    for t, stroke in enumerate(eval(raw_strokes)):\n",
    "        for i in range(len(stroke[0]) - 1):\n",
    "            color = 255 - min(t, 10) * 13 if time_color else 255\n",
    "            _ = cv2.line(img, (stroke[0][i] + 22, stroke[1][i]  + 22),\n",
    "                         (stroke[0][i + 1] + 22, stroke[1][i + 1] + 22), color, lw)\n",
    "    if size != BASE_SIZE:\n",
    "        return cv2.resize(img, (size, size))\n",
    "    else:\n",
    "        return img\n",
    "\n",
    "class QRDataset(Dataset):\n",
    "    def __init__(self, img_drawing, img_label, img_size, transform=None):\n",
    "        self.img_drawing = img_drawing\n",
    "        self.img_label = img_label\n",
    "        self.img_size = img_size\n",
    "        self.transform = transform\n",
    "\n",
    "    def __getitem__(self, index):\n",
    "        img = np.zeros((self.img_size, self.img_size, 3))\n",
    "        img[:, :, 0] = draw_cv2(self.img_drawing[index], self.img_size)\n",
    "        img[:, :, 1] = img[:, :, 0]\n",
    "        img[:, :, 2] = img[:, :, 0]\n",
    "        img = Image.fromarray(np.uint8(img))\n",
    "        \n",
    "        if self.transform is not None:\n",
    "            img = self.transform(img)\n",
    "        \n",
    "        label = torch.from_numpy(np.array([self.img_label[index]]))\n",
    "        return img, label\n",
    "\n",
    "    def __len__(self):\n",
    "        return len(self.img_drawing)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:34:10.599995Z",
     "start_time": "2018-11-16T08:34:09.632400Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "import torch\n",
    "import torchvision.models as models\n",
    "import torchvision.transforms as transforms\n",
    "import torchvision.datasets as datasets\n",
    "import torch.nn as nn\n",
    "import torch.optim as optim\n",
    "from torch.autograd import Variable\n",
    "from torch.utils.data.dataset import Dataset\n",
    "\n",
    "model = models.resnet50(True)\n",
    "model.avgpool = nn.AdaptiveAvgPool2d(1)\n",
    "model.fc = nn.Linear(2048, 340)\n",
    "\n",
    "\n",
    "model = nn.DataParallel(model).cuda()\n",
    "model.load_state_dict(torch.load('./resnet50_256_0_28116(81.3451_93.1845).pt'))\n",
    "\n",
    "optimizer = optim.Adam(model.parameters(), lr=0.0005)\n",
    "scheduler = optim.lr_scheduler.MultiStepLR(optimizer, milestones=[2, 3, 5, 7, 8], gamma=0.1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:06:44.672999Z",
     "start_time": "2018-11-16T08:06:44.626926Z"
    },
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "train_loader = torch.utils.data.DataLoader(\n",
    "    QRDataset(df_train['drawing'].values, df_train['word'].values, 256,\n",
    "                     transforms.Compose([\n",
    "                        transforms.RandomHorizontalFlip(),\n",
    "                        transforms.RandomVerticalFlip(),\n",
    "                        transforms.RandomAffine(5, scale=[0.85, 1.05]),\n",
    "                        transforms.ToTensor(),\n",
    "        ])\n",
    "    ),\n",
    "    batch_size=1500, shuffle=True, num_workers=10,\n",
    ")\n",
    "\n",
    "val_loader = torch.utils.data.DataLoader(\n",
    "    QRDataset(df_val['drawing'].values, df_val['word'].values, 256,\n",
    "                     transforms.Compose([\n",
    "                        transforms.RandomHorizontalFlip(),\n",
    "                        # transforms.RandomAffine(5, scale=[0.85, 1.05]),\n",
    "                        transforms.ToTensor(),\n",
    "        ])\n",
    "    ),\n",
    "    batch_size=1500, shuffle=True, num_workers=10,\n",
    ")\n",
    "\n",
    "import torch.nn.functional as F\n",
    "loss_fn = nn.CrossEntropyLoss()\n",
    "\n",
    "def accuracy(output, target, topk=(1,)):\n",
    "    \"\"\"Computes the accuracy over the k top predictions for the specified values of k\"\"\"\n",
    "    with torch.no_grad():\n",
    "        maxk = max(topk)\n",
    "        batch_size = target.size(0)\n",
    "\n",
    "        _, pred = output.topk(maxk, 1, True, True)\n",
    "        pred = pred.t()\n",
    "        correct = pred.eq(target.view(1, -1).expand_as(pred))\n",
    "\n",
    "        res = []\n",
    "        for k in topk:\n",
    "            correct_k = correct[:k].view(-1).float().sum(0, keepdim=True)\n",
    "            res.append(correct_k.mul_(100.0 / batch_size))\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2018-11-04T02:27:17.449Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "for epoch in range(10):\n",
    "    scheduler.step()\n",
    "    for i, data in enumerate(train_loader):\n",
    "        x, y = data\n",
    "        x = Variable(x).cuda(0)\n",
    "        y = Variable(y.view(-1)).cuda(0)\n",
    "\n",
    "        optimizer.zero_grad()\n",
    "        output = model(x)\n",
    "        loss = loss_fn(output, y)\n",
    "        loss.backward()\n",
    "        optimizer.step()\n",
    "\n",
    "        if i % 100 == 0:\n",
    "            acc1, acc3 = accuracy(output, y, topk=(1, 3))\n",
    "            logstr = 'Epoch {0}/{1}: \\tloss {2}, ACC {3:.4f}/{4:.4f}'.format(epoch, i, loss.item(), \n",
    "                                                                  acc1.item(), acc3.item())\n",
    "            logging.info(logstr)\n",
    "        if i % 1000 == 0:\n",
    "            torch.save(model.state_dict(), 'resnet18_{0}.pt'.format(epoch))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:15:59.005438Z",
     "start_time": "2018-11-16T08:06:50.918674Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "82.2666702271 91.1333389282 94.5333404541\n",
      "81.9333343506 89.6666717529 92.6000061035\n",
      "81.9333343506 90.2000045776 92.6666717529\n",
      "82.8666687012 91.8666687012 94.6000061035\n",
      "82.9333343506 91.2000045776 93.4000015259\n",
      "80.8000030518 90.8666687012 93.1333389282\n",
      "82.7333374023 91.8000030518 94.1333389282\n",
      "81.8000030518 90.2666702271 92.5333404541\n",
      "82.1333389282 90.6666717529 93.6000061035\n",
      "82.1333389282 90.8666687012 93.0666732788\n",
      "81.6666717529 91.4666748047 93.7333374023\n",
      "82.6666717529 91.4666748047 93.8666687012\n",
      "84.5333404541 92.6666717529 95.0666732788\n",
      "83.0000076294 90.7333374023 93.93334198\n",
      "82.8000030518 91.2000045776 93.5333404541\n",
      "85.0000076294 92.0000076294 93.7333374023\n",
      "81.2000045776 90.6000061035 93.2666702271\n",
      "80.6666717529 90.0000076294 93.0666732788\n",
      "82.5333404541 91.6000061035 94.1333389282\n",
      "83.4666748047 91.5333404541 94.2000045776\n",
      "81.1333389282 90.7333374023 93.8000030518\n",
      "82.8000030518 91.4000015259 94.5333404541\n",
      "84.6666717529 92.3333358765 94.6000061035\n",
      "82.6666717529 92.0000076294 94.6666717529\n",
      "81.9333343506 91.0666732788 93.6000061035\n",
      "81.6666717529 91.4000015259 94.2666702271\n",
      "81.0666732788 91.4666748047 93.6666717529\n",
      "82.8000030518 91.8666687012 93.8666687012\n",
      "83.3333358765 92.1333389282 95.2666702271\n",
      "82.2666702271 90.5333404541 93.7333374023\n",
      "81.6666717529 91.4000015259 93.6666717529\n",
      "80.4666671753 90.4666748047 93.0000076294\n",
      "84.2000045776 92.3333358765 94.93334198\n",
      "83.4666748047 91.1333389282 93.8666687012\n",
      "82.2666702271 91.6000061035 93.8000030518\n",
      "83.6000061035 91.0666732788 93.4666748047\n",
      "82.0666732788 91.1333389282 94.0000076294\n",
      "83.1333389282 91.0666732788 93.6666717529\n",
      "83.6000061035 91.8666687012 94.3333358765\n",
      "83.0000076294 91.2666702271 94.0000076294\n",
      "82.6000061035 90.5333404541 93.8000030518\n",
      "82.8000030518 90.9333343506 93.2000045776\n",
      "82.0000076294 89.8666687012 92.4666748047\n",
      "81.8000030518 90.7333374023 93.7333374023\n",
      "83.6666717529 91.7333374023 94.6666717529\n",
      "81.6666717529 90.4000015259 93.1333389282\n",
      "81.6000061035 91.2000045776 93.93334198\n",
      "81.3333358765 90.6000061035 93.0666732788\n",
      "82.4666671753 91.2666702271 93.8000030518\n",
      "82.8666687012 91.0666732788 93.8666687012\n",
      "82.4000015259 91.0000076294 93.6666717529\n",
      "83.0000076294 91.3333358765 93.5333404541\n",
      "83.2000045776 91.4666748047 93.5333404541\n",
      "80.6000061035 91.0000076294 93.4000015259\n",
      "84.6666717529 91.5333404541 93.6000061035\n",
      "82.0000076294 91.2666702271 93.2000045776\n",
      "82.6666717529 92.4666748047 94.6000061035\n",
      "81.7333374023 90.8000030518 93.6000061035\n",
      "80.3333358765 90.2666702271 92.7333374023\n",
      "82.8666687012 92.0000076294 94.4000015259\n",
      "81.7333374023 91.7333374023 94.4000015259\n",
      "82.3333358765 90.4000015259 92.3333358765\n",
      "82.4000015259 91.2666702271 93.5333404541\n",
      "80.6666717529 90.1333389282 93.6000061035\n",
      "81.3333358765 90.8666687012 93.8000030518\n",
      "82.5333404541 91.0666732788 93.2666702271\n",
      "82.9333343506 91.9333343506 94.2000045776\n",
      "82.0666732788 91.0000076294 93.7333374023\n",
      "82.4000015259 90.6666717529 93.2000045776\n",
      "80.9333343506 90.9333343506 93.7333374023\n",
      "81.2000045776 89.2666702271 91.8000030518\n",
      "81.8666687012 91.5333404541 94.4000015259\n",
      "84.2000045776 91.9333343506 94.2666702271\n",
      "81.1333389282 90.2666702271 92.93334198\n",
      "84.4000015259 92.2000045776 94.2000045776\n",
      "83.6666717529 93.3333358765 94.8666687012\n",
      "82.4666671753 91.8666687012 94.4666748047\n",
      "81.8000030518 91.8000030518 94.1333389282\n",
      "81.5333404541 90.5333404541 92.93334198\n",
      "83.1333389282 91.3333358765 93.8000030518\n",
      "81.2666702271 90.4666748047 92.6666717529\n",
      "82.4000015259 90.4666748047 93.1333389282\n",
      "81.8000030518 91.2666702271 93.4000015259\n",
      "82.8000030518 91.2000045776 93.93334198\n",
      "81.9333343506 89.9333343506 93.0000076294\n",
      "82.5333404541 90.6666717529 93.2000045776\n",
      "81.7333374023 91.2666702271 94.2666702271\n",
      "82.2666702271 90.3333358765 93.5333404541\n",
      "82.5333404541 91.2666702271 93.3333358765\n",
      "82.0000076294 90.6000061035 93.2000045776\n",
      "81.8666687012 91.0000076294 94.3333358765\n",
      "81.4000015259 90.8000030518 93.8666687012\n",
      "80.4666671753 89.7333374023 92.6666717529\n",
      "81.9333343506 91.0666732788 93.3333358765\n",
      "83.1333389282 91.7333374023 94.5333404541\n",
      "82.4666671753 90.6666717529 93.2666702271\n",
      "82.6000061035 89.8666687012 93.2666702271\n",
      "82.0000076294 91.0666732788 93.7333374023\n",
      "82.3333358765 91.1333389282 93.5333404541\n",
      "82.1333389282 90.8666687012 93.6666717529\n",
      "83.2666702271 91.0000076294 93.6666717529\n",
      "82.0000076294 90.4666748047 92.7333374023\n",
      "82.6000061035 91.2666702271 93.93334198\n",
      "84.0666732788 92.0000076294 94.5333404541\n",
      "82.6666717529 90.0666732788 92.93334198\n",
      "81.3333358765 90.7333374023 93.3333358765\n",
      "81.6666717529 90.4000015259 93.0666732788\n",
      "81.4666671753 90.6000061035 92.93334198\n",
      "82.7333374023 91.4000015259 93.6666717529\n",
      "81.3333358765 90.1333389282 93.0000076294\n",
      "80.2666702271 89.9333343506 92.8000030518\n",
      "80.8000030518 89.8000030518 92.6000061035\n",
      "82.9333343506 91.0000076294 93.7333374023\n",
      "82.8000030518 90.9333343506 93.4000015259\n",
      "82.0000076294 91.5333404541 93.4666748047\n",
      "81.6666717529 90.4666748047 92.6000061035\n",
      "82.0666732788 90.0666732788 92.5333404541\n",
      "82.4000015259 89.9333343506 92.8000030518\n",
      "82.4000015259 90.8000030518 93.4000015259\n",
      "82.6000061035 92.0000076294 93.5333404541\n",
      "83.6000061035 91.9333343506 93.5333404541\n",
      "80.2000045776 90.2000045776 93.6000061035\n",
      "83.4000015259 91.6000061035 94.1333389282\n",
      "83.4000015259 91.0666732788 93.6666717529\n",
      "81.8000030518 91.3333358765 93.8000030518\n",
      "81.9333343506 90.8666687012 93.5333404541\n",
      "82.2666702271 91.7333374023 93.93334198\n",
      "82.7333374023 91.5333404541 93.93334198\n",
      "81.4666671753 90.7333374023 93.2666702271\n",
      "83.4666748047 90.8666687012 93.2666702271\n",
      "82.4000015259 91.9333343506 94.3333358765\n",
      "80.6666717529 90.7333374023 93.0000076294\n",
      "82.3333358765 90.7333374023 93.3333358765\n",
      "80.9333343506 91.3333358765 93.2000045776\n",
      "83.5333404541 91.6666717529 93.6000061035\n",
      "83.0666732788 91.0666732788 93.4666748047\n",
      "82.9333343506 92.3333358765 94.6666717529\n",
      "82.9333343506 90.6000061035 92.93334198\n",
      "84.0000076294 92.3333358765 94.3333358765\n",
      "82.4666671753 91.8666687012 94.4666748047\n",
      "82.0666732788 90.9333343506 93.6666717529\n",
      "83.3333358765 91.7333374023 94.1333389282\n",
      "81.4666671753 90.5333404541 93.3333358765\n",
      "83.2666702271 92.0666732788 94.3333358765\n",
      "81.8666687012 91.0000076294 93.4000015259\n",
      "83.6666717529 91.6000061035 94.2666702271\n",
      "82.0666732788 90.7333374023 93.1333389282\n",
      "82.8666687012 90.8666687012 94.0000076294\n",
      "83.7333374023 92.6000061035 94.6666717529\n",
      "82.8000030518 90.6666717529 93.2000045776\n",
      "81.7333374023 91.0000076294 93.4666748047\n",
      "81.7333374023 91.0666732788 93.6000061035\n",
      "81.6666717529 91.3333358765 93.8000030518\n",
      "82.7333374023 90.5333404541 92.7333374023\n",
      "84.2000045776 92.0666732788 94.4666748047\n",
      "82.0000076294 90.4666748047 92.7333374023\n",
      "81.0000076294 90.2000045776 93.2000045776\n",
      "80.2666702271 90.8666687012 93.6666717529\n",
      "80.3333358765 89.6000061035 92.8666687012\n",
      "81.8000030518 90.9333343506 93.2666702271\n",
      "81.3333358765 90.0666732788 93.1333389282\n",
      "80.8000030518 90.8000030518 94.0000076294\n",
      "82.2000045776 91.4666748047 94.8666687012\n",
      "82.2000045776 90.4000015259 93.1333389282\n",
      "83.2000045776 91.5333404541 94.2000045776\n",
      "80.8666687012 90.7333374023 93.8000030518\n",
      "83.2000045776 91.4666748047 94.0666732788\n",
      "83.4666748047 91.7333374023 93.8000030518\n",
      "83.1333389282 91.2000045776 93.6666717529\n",
      "79.9333343506 91.2666702271 93.8000030518\n",
      "81.7333374023 90.8666687012 93.2000045776\n",
      "81.4666671753 90.4666748047 93.6000061035\n",
      "83.0000076294 92.0666732788 94.4666748047\n",
      "82.8000030518 90.9333343506 93.0000076294\n",
      "83.0666732788 91.1333389282 93.5333404541\n",
      "82.0666732788 90.8666687012 94.0666732788\n",
      "81.8000030518 91.4000015259 93.93334198\n",
      "81.2666702271 91.2666702271 93.4000015259\n",
      "82.4000015259 91.4000015259 93.5333404541\n",
      "82.2666702271 90.0000076294 93.0666732788\n",
      "84.4666748047 92.4000015259 94.93334198\n",
      "82.7333374023 91.9333343506 94.4000015259\n",
      "80.1333389282 89.6000061035 93.0666732788\n",
      "81.1333389282 90.9333343506 93.5333404541\n",
      "81.8000030518 90.9333343506 93.1333389282\n",
      "81.1333389282 90.0666732788 92.2666702271\n",
      "82.1333389282 91.0666732788 93.6000061035\n",
      "83.2666702271 92.0666732788 94.2666702271\n",
      "81.8666687012 90.9333343506 93.3333358765\n",
      "80.9333343506 90.5333404541 94.0000076294\n",
      "81.3333358765 90.6000061035 93.7333374023\n",
      "81.8666687012 90.8666687012 93.4000015259\n",
      "81.2666702271 91.0666732788 93.2000045776\n",
      "81.7333374023 91.3333358765 94.2000045776\n",
      "79.7333374023 90.0666732788 92.5333404541\n",
      "82.1333389282 91.8666687012 94.4666748047\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "83.5333404541 91.6666717529 93.6666717529\n",
      "81.6000061035 90.9333343506 94.6000061035\n",
      "83.1333389282 91.2000045776 93.0666732788\n",
      "82.6666717529 90.8666687012 93.2000045776\n",
      "82.8000030518 90.5333404541 93.0666732788\n",
      "84.0666732788 92.5333404541 94.6000061035\n",
      "82.2666702271 90.6666717529 94.0000076294\n",
      "82.4666671753 91.1333389282 93.7333374023\n",
      "80.7333374023 90.3333358765 92.7333374023\n",
      "83.0000076294 92.0000076294 95.0000076294\n",
      "82.5333404541 91.0666732788 93.8000030518\n",
      "83.6000061035 92.2000045776 94.2000045776\n",
      "83.0666732788 91.6666717529 94.4000015259\n",
      "82.2000045776 91.4000015259 93.7333374023\n",
      "83.8666687012 92.6000061035 94.7333374023\n",
      "81.8666687012 91.6000061035 93.93334198\n",
      "81.5333404541 89.8000030518 92.5333404541\n",
      "83.3333358765 91.8000030518 93.5333404541\n",
      "82.2000045776 89.9333343506 92.4000015259\n",
      "82.8000030518 91.4000015259 93.8666687012\n",
      "83.3333358765 90.1333389282 92.2000045776\n",
      "82.0666732788 91.3333358765 94.1333389282\n",
      "82.4666671753 89.9333343506 92.8666687012\n",
      "82.0000076294 90.8666687012 93.5333404541\n",
      "81.2000045776 90.8666687012 92.5333404541\n",
      "81.0000076294 90.3333358765 93.7333374023\n",
      "81.2000045776 90.6000061035 92.8666687012\n",
      "83.5333404541 91.5333404541 93.6666717529\n",
      "83.7333374023 92.2666702271 94.7333374023\n",
      "81.0666732788 91.4666748047 94.3333358765\n",
      "83.0666732788 91.9333343506 94.1333389282\n",
      "81.4666671753 90.7333374023 93.4000015259\n",
      "83.5333404541 91.8000030518 94.0000076294\n",
      "81.5333404541 90.1333389282 92.6000061035\n",
      "82.2666702271 91.1333389282 93.8666687012\n",
      "81.9333343506 90.6000061035 93.2000045776\n",
      "82.6000061035 91.3333358765 93.7333374023\n",
      "84.2666702271 92.1333389282 93.93334198\n",
      "80.6000061035 90.4666748047 93.1333389282\n",
      "81.0000076294 90.8000030518 93.5333404541\n",
      "82.8000030518 90.2666702271 92.8000030518\n",
      "80.4666671753 89.5333404541 92.6000061035\n",
      "80.2666702271 89.2000045776 92.6666717529\n",
      "80.0666732788 89.5333404541 92.1333389282\n",
      "81.1333389282 90.0666732788 93.0666732788\n",
      "81.2666702271 89.6000061035 92.2000045776\n",
      "81.4000015259 90.6000061035 93.0000076294\n",
      "82.0666732788 91.1333389282 93.6000061035\n",
      "82.8000030518 91.4000015259 93.6000061035\n",
      "82.0666732788 91.6000061035 94.1333389282\n",
      "82.7333374023 91.2000045776 93.4666748047\n",
      "82.0000076294 90.5333404541 93.2666702271\n",
      "81.4000015259 90.6000061035 93.5333404541\n",
      "83.3333358765 91.6000061035 93.4000015259\n",
      "82.0000076294 91.1333389282 93.4666748047\n",
      "82.0666732788 90.7333374023 93.2000045776\n",
      "82.6666717529 91.5333404541 93.6666717529\n",
      "81.2666702271 91.2000045776 93.4666748047\n",
      "83.2666702271 91.6000061035 93.8000030518\n",
      "80.4666671753 89.9333343506 92.93334198\n",
      "83.3333358765 92.0000076294 94.6666717529\n",
      "81.6666717529 90.6666717529 93.4000015259\n",
      "83.3333358765 90.8666687012 93.4666748047\n",
      "80.3333358765 89.6666717529 92.2666702271\n",
      "82.8000030518 91.1333389282 93.1333389282\n",
      "83.0000076294 92.5333404541 94.7333374023\n",
      "82.8666687012 91.3333358765 93.4666748047\n",
      "81.8666687012 90.8666687012 93.2666702271\n",
      "80.6666717529 89.3333358765 92.8000030518\n",
      "82.8000030518 91.2666702271 93.8000030518\n",
      "83.0000076294 90.6666717529 93.2666702271\n",
      "83.8666687012 92.0000076294 94.93334198\n",
      "84.0000076294 92.0000076294 94.8000030518\n",
      "83.4000015259 92.1333389282 94.2000045776\n",
      "82.2666702271 91.4000015259 93.0000076294\n",
      "82.0666732788 91.3333358765 93.8000030518\n",
      "82.6000061035 92.5333404541 94.4666748047\n",
      "83.6666717529 92.0666732788 95.0000076294\n",
      "82.4666671753 90.3333358765 92.6000061035\n",
      "82.2000045776 91.1333389282 93.6666717529\n",
      "82.2000045776 91.3333358765 93.6000061035\n",
      "83.6666717529 91.8666687012 93.7333374023\n",
      "81.6000061035 90.1333389282 93.5333404541\n",
      "82.2666702271 91.3333358765 93.6000061035\n",
      "82.4666671753 91.4000015259 94.2000045776\n",
      "80.9333343506 90.4666748047 92.8666687012\n",
      "83.1333389282 91.4000015259 94.0666732788\n",
      "81.0000076294 90.0666732788 92.0666732788\n",
      "82.6000061035 92.6000061035 94.6666717529\n",
      "82.1333389282 91.4666748047 94.3333358765\n",
      "81.8000030518 90.5333404541 93.0666732788\n",
      "82.9333343506 91.3333358765 93.93334198\n",
      "84.0666732788 92.2666702271 94.8666687012\n",
      "81.1333389282 90.1333389282 92.4666748047\n",
      "82.9333343506 92.5333404541 94.93334198\n",
      "82.2000045776 90.6000061035 93.0666732788\n",
      "83.5333404541 92.2666702271 94.2000045776\n",
      "82.2000045776 91.3333358765 93.8000030518\n",
      "83.0000076294 91.2000045776 93.3333358765\n",
      "84.7333374023 92.1333389282 94.8000030518\n",
      "82.4000015259 92.0666732788 94.2666702271\n",
      "82.5333404541 92.0000076294 94.3333358765\n",
      "83.2000045776 91.2666702271 93.6666717529\n",
      "82.3333358765 90.2000045776 93.1333389282\n",
      "83.9333343506 91.8000030518 94.6666717529\n",
      "82.3333358765 90.6000061035 93.0666732788\n",
      "82.9333343506 90.6666717529 93.7333374023\n",
      "82.4000015259 91.2666702271 93.3333358765\n",
      "81.3333358765 90.6666717529 93.4666748047\n",
      "81.4666671753 91.4000015259 94.1333389282\n",
      "83.6666717529 92.0000076294 94.6666717529\n",
      "83.1333389282 91.0000076294 93.93334198\n",
      "82.1333389282 90.8000030518 93.8000030518\n",
      "80.4000015259 89.4666748047 91.7333374023\n",
      "81.7333374023 90.6000061035 93.1333389282\n",
      "81.9333343506 90.7333374023 93.8666687012\n",
      "80.5333404541 89.9333343506 92.7333374023\n",
      "78.5333404541 89.5333404541 92.4000015259\n",
      "83.3333358765 91.1333389282 94.3333358765\n",
      "81.7333374023 91.2000045776 93.5333404541\n",
      "82.4666671753 91.0000076294 93.6666717529\n",
      "83.8666687012 92.0666732788 94.1333389282\n",
      "82.2666702271 91.1333389282 93.7333374023\n",
      "82.2000045776 92.7333374023 95.2000045776\n",
      "81.8666687012 91.1333389282 94.0000076294\n",
      "81.0666732788 90.3333358765 93.4666748047\n",
      "84.8666687012 92.4000015259 95.4000015259\n",
      "82.0000076294 90.7333374023 93.2666702271\n",
      "81.0666732788 90.8666687012 93.6666717529\n",
      "82.8000030518 90.8000030518 93.3333358765\n",
      "85.7333374023 92.93334198 95.2666702271\n",
      "82.1333389282 90.5333404541 93.3333358765\n",
      "81.2666702271 91.0000076294 93.3333358765\n",
      "81.0000076294 90.7333374023 93.6000061035\n",
      "83.6000061035 91.8000030518 94.4000015259\n",
      "81.4000015259 91.0666732788 94.0000076294\n",
      "82.3333358765 91.9333343506 94.6666717529\n",
      "78.5999984741 88.5999984741 91.5999984741\n",
      "82.2708624422907 91.07984494877432 93.6307436092171\n"
     ]
    }
   ],
   "source": [
    "acc1_, acc2_, acc3_ = [], [], []\n",
    "with torch.no_grad():\n",
    "    model = model.eval()\n",
    "    for data in val_loader:\n",
    "        images, labels = data\n",
    "        images = Variable(images).cuda(async=True)\n",
    "        labels = Variable(labels.view(-1)).cuda()\n",
    "        \n",
    "        outputs = model(images)\n",
    "        acc1, acc2, acc3 = accuracy(outputs, labels, topk=(1, 2, 3))\n",
    "        \n",
    "        acc1_.append(acc1.item())\n",
    "        acc2_.append(acc2.item())\n",
    "        acc3_.append(acc3.item())\n",
    "        print acc1.item(), acc2.item(), acc3.item()\n",
    "        \n",
    "print np.mean(acc1_), np.mean(acc2_), np.mean(acc3_)\n",
    "# 83.19421590016988 94.2012027809006"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:34:16.849598Z",
     "start_time": "2018-11-16T08:34:16.080528Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "submit = pd.read_csv('../input/sample_submission.csv')\n",
    "submit_df = pd.read_csv('../input/test_simplified.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:34:19.237798Z",
     "start_time": "2018-11-16T08:34:19.224759Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "test_loader = torch.utils.data.DataLoader(\n",
    "    QRDataset(submit_df['drawing'].values, np.zeros(submit_df.shape[0]), 256,\n",
    "                     transforms.Compose([\n",
    "                        transforms.RandomHorizontalFlip(),\n",
    "                        transforms.RandomVerticalFlip(),\n",
    "                        # transforms.RandomAffine(5, scale=[0.85, 1.05]),\n",
    "                        transforms.ToTensor(),\n",
    "        ])\n",
    "    ),\n",
    "    batch_size=1500, shuffle=False, num_workers=10,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:45:28.694630Z",
     "start_time": "2018-11-16T08:34:21.687245Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "1\n",
      "2\n",
      "3\n",
      "4\n"
     ]
    }
   ],
   "source": [
    "pred_tta = []\n",
    "for tti in range(5):\n",
    "    pred  = []\n",
    "    with torch.no_grad():\n",
    "        for t, (x, y) in enumerate(test_loader):\n",
    "            x_var = Variable(x).cuda(async=True)\n",
    "            y_var = Variable(y).cuda()\n",
    "            scores = model(x_var)\n",
    "            pred.append(scores.data.cpu().numpy())\n",
    "    pred = np.concatenate(pred, 0)\n",
    "    \n",
    "    print(tti)\n",
    "pred_tta.append(pred)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:48:55.101167Z",
     "start_time": "2018-11-16T08:48:54.901860Z"
    }
   },
   "outputs": [],
   "source": [
    "pred = np.mean(pred_tta, axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:49:01.985127Z",
     "start_time": "2018-11-16T08:48:55.176417Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "import warnings\n",
    "warnings.filterwarnings(\"ignore\", category=DeprecationWarning) \n",
    "pred_label = [lbl.inverse_transform(x.argsort()[-3:][::-1]) for x in pred]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:49:02.285567Z",
     "start_time": "2018-11-16T08:49:01.988983Z"
    }
   },
   "outputs": [],
   "source": [
    "pred_label = np.vstack(pred_label)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:49:02.399610Z",
     "start_time": "2018-11-16T08:49:02.290334Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "submit['top1'] = pred_label[:, 0]\n",
    "submit['top2'] = pred_label[:, 1]\n",
    "submit['top3'] = pred_label[:, 2]\n",
    "\n",
    "submit['top1'] = submit['top1'].apply(lambda x: x.replace(' ', '_'))\n",
    "submit['top2'] = submit['top2'].apply(lambda x: x.replace(' ', '_'))\n",
    "submit['top3'] = submit['top3'].apply(lambda x: x.replace(' ', '_'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-16T08:49:02.643171Z",
     "start_time": "2018-11-16T08:49:02.403242Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "submit['word'] = submit['top1'] + ' ' + submit['top2'] + ' ' + submit['top3']\n",
    "submit[['key_id', 'word']].to_csv('./1116_82.270_93.630_tta5.csv', index=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-13T01:37:59.190240Z",
     "start_time": "2018-11-13T01:37:59.052492Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[array(['radio', 'stereo', 'binoculars'], dtype=object),\n",
       " array(['hockey puck', 'bottlecap', 'pool'], dtype=object),\n",
       " array(['The Great Wall of China', 'castle', 'fence'], dtype=object),\n",
       " array(['mountain', 'elbow', 'necklace'], dtype=object),\n",
       " array(['campfire', 'fireplace', 'fire hydrant'], dtype=object),\n",
       " array(['fence', 'jail', 'spreadsheet'], dtype=object),\n",
       " array(['wine glass', 'hourglass', 'shovel'], dtype=object),\n",
       " array(['submarine', 'dolphin', 'lobster'], dtype=object),\n",
       " array(['bracelet', 'hand', 'arm'], dtype=object),\n",
       " array(['hourglass', 'vase', 'wine glass'], dtype=object),\n",
       " array(['octopus', 'octagon', 'snowflake'], dtype=object),\n",
       " array(['stove', 'oven', 'dishwasher'], dtype=object),\n",
       " array(['camel', 'roller coaster', 'squiggle'], dtype=object),\n",
       " array(['stereo', 'skull', 'traffic light'], dtype=object),\n",
       " array(['harp', 'cello', 'violin'], dtype=object),\n",
       " array(['shorts', 'underwear', 'pants'], dtype=object),\n",
       " array(['sailboat', 'cruise ship', 'speedboat'], dtype=object),\n",
       " array(['hospital', 'church', 'barn'], dtype=object),\n",
       " array(['giraffe', 'roller coaster', 'saxophone'], dtype=object),\n",
       " array(['shark', 'dragon', 'crocodile'], dtype=object),\n",
       " array(['tractor', 'bulldozer', 'truck'], dtype=object),\n",
       " array(['teddy-bear', 'panda', 'bear'], dtype=object),\n",
       " array(['megaphone', 'flashlight', 'microphone'], dtype=object),\n",
       " array(['microphone', 'megaphone', 'fan'], dtype=object),\n",
       " array(['dragon', 'swan', 'bird'], dtype=object),\n",
       " array(['lion', 'tiger', 'hedgehog'], dtype=object),\n",
       " array(['sock', 'boomerang', 'hockey stick'], dtype=object),\n",
       " array(['bat', 'bird', 'dragon'], dtype=object),\n",
       " array(['garden', 'grass', 'camouflage'], dtype=object),\n",
       " array(['bathtub', 'hot tub', 'pool'], dtype=object),\n",
       " array(['pliers', 'mosquito', 'owl'], dtype=object),\n",
       " array(['sword', 'pencil', 'marker'], dtype=object),\n",
       " array(['clock', 'compass', 'wristwatch'], dtype=object),\n",
       " array(['yoga', 'flamingo', 'knee'], dtype=object),\n",
       " array(['tiger', 'raccoon', 'lion'], dtype=object),\n",
       " array(['hot dog', 'sandwich', 'cooler'], dtype=object),\n",
       " array(['computer', 'laptop', 'keyboard'], dtype=object),\n",
       " array(['baseball bat', 'bat', 'baseball'], dtype=object),\n",
       " array(['spider', 'crab', 'lobster'], dtype=object),\n",
       " array(['sword', 'drill', 'bowtie'], dtype=object),\n",
       " array(['goatee', 'beard', 'necklace'], dtype=object),\n",
       " array(['wheel', 'fan', 'cooler'], dtype=object),\n",
       " array(['palm tree', 'beach', 'windmill'], dtype=object),\n",
       " array(['airplane', 'helicopter', 'skyscraper'], dtype=object),\n",
       " array(['triangle', 'tent', 'diamond'], dtype=object),\n",
       " array(['screwdriver', 'popsicle', 'pear'], dtype=object),\n",
       " array(['wristwatch', 'sink', 'kangaroo'], dtype=object),\n",
       " array(['baseball bat', 'bat', 'baseball'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['helicopter', 'whale', 'submarine'], dtype=object),\n",
       " array(['bandage', 'dresser', 'stitches'], dtype=object),\n",
       " array(['guitar', 'cello', 'violin'], dtype=object),\n",
       " array(['train', 'cruise ship', 'The Great Wall of China'], dtype=object),\n",
       " array(['marker', 'crayon', 'pencil'], dtype=object),\n",
       " array(['ambulance', 'firetruck', 'police car'], dtype=object),\n",
       " array(['crown', 'chandelier', 'pants'], dtype=object),\n",
       " array(['lantern', 'floor lamp', 'dumbbell'], dtype=object),\n",
       " array(['church', 'hospital', 'ambulance'], dtype=object),\n",
       " array(['coffee cup', 'mug', 'cup'], dtype=object),\n",
       " array(['underwear', 'pants', 'anvil'], dtype=object),\n",
       " array(['skyscraper', 'The Eiffel Tower', 'remote control'], dtype=object),\n",
       " array(['sun', 'flashlight', 'moon'], dtype=object),\n",
       " array(['necklace', 'bracelet', 'church'], dtype=object),\n",
       " array(['mug', 'coffee cup', 'cup'], dtype=object),\n",
       " array(['mushroom', 'cactus', 'helmet'], dtype=object),\n",
       " array(['bucket', 'paint can', 'cup'], dtype=object),\n",
       " array(['shorts', 'underwear', 'pants'], dtype=object),\n",
       " array(['fork', 'rake', 'broom'], dtype=object),\n",
       " array(['speedboat', 'sailboat', 'diving board'], dtype=object),\n",
       " array(['bread', 'sleeping bag', 'steak'], dtype=object),\n",
       " array(['bush', 'cloud', 'brain'], dtype=object),\n",
       " array(['ladder', 'diving board', 'skyscraper'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['paper clip', 'ear', 'trombone'], dtype=object),\n",
       " array(['pants', 'shorts', 'belt'], dtype=object),\n",
       " array(['panda', 'raccoon', 'teddy-bear'], dtype=object),\n",
       " array(['dumbbell', 'eyeglasses', 'trumpet'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['guitar', 'violin', 'cello'], dtype=object),\n",
       " array(['swing set', 'see saw', 'dresser'], dtype=object),\n",
       " array(['camouflage', 'jacket', 'sweater'], dtype=object),\n",
       " array(['piano', 'eraser', 'matches'], dtype=object),\n",
       " array(['squiggle', 'ocean', 'zigzag'], dtype=object),\n",
       " array(['animal migration', 'bird', 'bat'], dtype=object),\n",
       " array(['blueberry', 'onion', 'blackberry'], dtype=object),\n",
       " array(['squiggle', 'zigzag', 'ocean'], dtype=object),\n",
       " array(['fork', 'rake', 'broom'], dtype=object),\n",
       " array(['spreadsheet', 'calendar', 'cooler'], dtype=object),\n",
       " array(['shorts', 'pants', 'underwear'], dtype=object),\n",
       " array(['tornado', 'hurricane', 'garden hose'], dtype=object),\n",
       " array(['sailboat', 'cruise ship', 'speedboat'], dtype=object),\n",
       " array(['pig', 'dog', 'cat'], dtype=object),\n",
       " array(['axe', 'megaphone', 'hammer'], dtype=object),\n",
       " array(['candle', 'toothpaste', 'clarinet'], dtype=object),\n",
       " array(['angel', 'yoga', 'bird'], dtype=object),\n",
       " array(['saw', 'see saw', 'bat'], dtype=object),\n",
       " array(['hot air balloon', 'parachute', 'light bulb'], dtype=object),\n",
       " array(['tornado', 'hurricane', 'garden hose'], dtype=object),\n",
       " array(['sink', 'bathtub', 'dishwasher'], dtype=object),\n",
       " array(['diamond', 'parachute', 'fan'], dtype=object),\n",
       " array(['anvil', 'underwear', 'hourglass'], dtype=object),\n",
       " array(['lighthouse', 'diving board', 'marker'], dtype=object),\n",
       " array(['couch', 'bench', 'cooler'], dtype=object),\n",
       " array(['teapot', 'mug', 'cup'], dtype=object),\n",
       " array(['skyscraper', 'door', 'streetlight'], dtype=object),\n",
       " array(['toilet', 'cooler', 'chair'], dtype=object),\n",
       " array(['star', 'snowflake', 'stairs'], dtype=object),\n",
       " array(['violin', 'cello', 'guitar'], dtype=object),\n",
       " array(['hedgehog', 'dragon', 'raccoon'], dtype=object),\n",
       " array(['pliers', 'scissors', 'yoga'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['key', 'nail', 'saw'], dtype=object),\n",
       " array(['hat', 'flying saucer', 'baseball bat'], dtype=object),\n",
       " array(['saw', 'see saw', 'key'], dtype=object),\n",
       " array(['giraffe', 'leg', 'knee'], dtype=object),\n",
       " array(['stop sign', 'octagon', 'hexagon'], dtype=object),\n",
       " array(['castle', 'church', 'skyscraper'], dtype=object),\n",
       " array(['lantern', 'lighthouse', 'floor lamp'], dtype=object),\n",
       " array(['angel', 'dragon', 'chandelier'], dtype=object),\n",
       " array(['bush', 'beard', 'campfire'], dtype=object),\n",
       " array(['paintbrush', 'paint can', 'spoon'], dtype=object),\n",
       " array(['panda', 'teddy-bear', 'bear'], dtype=object),\n",
       " array(['fire hydrant', 'lantern', 'candle'], dtype=object),\n",
       " array(['baseball bat', 'marker', 'bat'], dtype=object),\n",
       " array(['light bulb', 'lightning', 'floor lamp'], dtype=object),\n",
       " array(['golf club', 'hockey stick', 'leg'], dtype=object),\n",
       " array(['monkey', 'teddy-bear', 'panda'], dtype=object),\n",
       " array(['scissors', 'pliers', 'sword'], dtype=object),\n",
       " array(['sock', 'boomerang', 'shoe'], dtype=object),\n",
       " array(['cookie', 'moon', 'soccer ball'], dtype=object),\n",
       " array(['circle', 'moon', 'potato'], dtype=object),\n",
       " array(['sea turtle', 'frog', 'crocodile'], dtype=object),\n",
       " array(['purse', 'basket', 'house'], dtype=object),\n",
       " array(['submarine', 'cruise ship', 'helicopter'], dtype=object),\n",
       " array(['microphone', 'megaphone', 'marker'], dtype=object),\n",
       " array(['submarine', 'helicopter', 'cruise ship'], dtype=object),\n",
       " array(['camera', 'pickup truck', 'cooler'], dtype=object),\n",
       " array(['swan', 'duck', 'flamingo'], dtype=object),\n",
       " array(['piano', 'dumbbell', 'matches'], dtype=object),\n",
       " array(['rabbit', 'squirrel', 'dog'], dtype=object),\n",
       " array(['ceiling fan', 'fan', 'chandelier'], dtype=object),\n",
       " array(['diving board', 'sock', 'hockey stick'], dtype=object),\n",
       " array(['owl', 'pig', 'dog'], dtype=object),\n",
       " array(['school bus', 'bus', 'van'], dtype=object),\n",
       " array(['skyscraper', 'diving board', 'marker'], dtype=object),\n",
       " array(['hockey puck', 'hockey stick', 'golf club'], dtype=object),\n",
       " array(['tornado', 'hurricane', 'drill'], dtype=object),\n",
       " array(['trumpet', 'clarinet', 'trombone'], dtype=object),\n",
       " array(['garden hose', 'snake', 'waterslide'], dtype=object),\n",
       " array(['pineapple', 'lantern', 'strawberry'], dtype=object),\n",
       " array(['screwdriver', 'baseball bat', 'bat'], dtype=object),\n",
       " array(['blueberry', 'apple', 'blackberry'], dtype=object),\n",
       " array(['umbrella', 'parachute', 'mushroom'], dtype=object),\n",
       " array(['finger', 'toe', 'nail'], dtype=object),\n",
       " array(['shovel', 'screwdriver', 'rake'], dtype=object),\n",
       " array(['mouse', 'frog', 'crocodile'], dtype=object),\n",
       " array(['onion', 'garden hose', 'blueberry'], dtype=object),\n",
       " array(['dog', 'frog', 'elephant'], dtype=object),\n",
       " array(['dishwasher', 'oven', 'stove'], dtype=object),\n",
       " array(['lollipop', 'popsicle', 'hurricane'], dtype=object),\n",
       " array(['sword', 'screwdriver', 'baseball bat'], dtype=object),\n",
       " array(['remote control', 'skyscraper', 'cell phone'], dtype=object),\n",
       " array(['jail', 'camouflage', 'calendar'], dtype=object),\n",
       " array(['shoe', 'pickup truck', 'trumpet'], dtype=object),\n",
       " array(['envelope', 'postcard', 'mailbox'], dtype=object),\n",
       " array(['clarinet', 'trombone', 'trumpet'], dtype=object),\n",
       " array(['flower', 'fan', 'house plant'], dtype=object),\n",
       " array(['pond', 'garden', 'golf club'], dtype=object),\n",
       " array(['bird', 'parrot', 'mosquito'], dtype=object),\n",
       " array(['bread', 'peas', 'beard'], dtype=object),\n",
       " array(['asparagus', 'crayon', 'paintbrush'], dtype=object),\n",
       " array(['dresser', 'calendar', 'map'], dtype=object),\n",
       " array(['bridge', 'moustache', 'goatee'], dtype=object),\n",
       " array(['garden', 'garden hose', 'grass'], dtype=object),\n",
       " array(['stop sign', 'marker', 'dumbbell'], dtype=object),\n",
       " array(['pants', 'shorts', 'jacket'], dtype=object),\n",
       " array(['crocodile', 'dragon', 'shark'], dtype=object),\n",
       " array(['pond', 'pool', 'steak'], dtype=object),\n",
       " array(['submarine', 'speedboat', 'cruise ship'], dtype=object),\n",
       " array(['dragon', 'squirrel', 'parrot'], dtype=object),\n",
       " array(['windmill', 'ceiling fan', 'fan'], dtype=object),\n",
       " array(['tiger', 'raccoon', 'zebra'], dtype=object),\n",
       " array(['snorkel', 'diving board', 'hockey puck'], dtype=object),\n",
       " array(['cruise ship', 'cake', 'birthday cake'], dtype=object),\n",
       " array(['crab', 'lobster', 'scorpion'], dtype=object),\n",
       " array(['mosquito', 'butterfly', 'dragon'], dtype=object),\n",
       " array(['potato', 'peanut', 'nose'], dtype=object),\n",
       " array(['dresser', 'piano', 'sandwich'], dtype=object),\n",
       " array(['grapes', 'blackberry', 'blueberry'], dtype=object),\n",
       " array(['peas', 'circle', 'grapes'], dtype=object),\n",
       " array(['cooler', 'stove', 'oven'], dtype=object),\n",
       " array(['mailbox', 'hammer', 'floor lamp'], dtype=object),\n",
       " array(['duck', 'bird', 'swan'], dtype=object),\n",
       " array(['birthday cake', 'cake', 'hot tub'], dtype=object),\n",
       " array(['computer', 'laptop', 'television'], dtype=object),\n",
       " array(['traffic light', 'streetlight', 'power outlet'], dtype=object),\n",
       " array(['teapot', 'mug', 'coffee cup'], dtype=object),\n",
       " array(['octopus', 'octagon', 'hand'], dtype=object),\n",
       " array(['calendar', 'calculator', 'spreadsheet'], dtype=object),\n",
       " array(['crab', 'lobster', 'scorpion'], dtype=object),\n",
       " array(['cow', 'tiger', 'zebra'], dtype=object),\n",
       " array(['umbrella', 'parachute', 'axe'], dtype=object),\n",
       " array(['dresser', 'cooler', 'matches'], dtype=object),\n",
       " array(['soccer ball', 'pizza', 'basketball'], dtype=object),\n",
       " array(['anvil', 'pillow', 'underwear'], dtype=object),\n",
       " array(['firetruck', 'pickup truck', 'truck'], dtype=object),\n",
       " array(['bus', 'school bus', 'van'], dtype=object),\n",
       " array(['submarine', 'speedboat', 'cruise ship'], dtype=object),\n",
       " array(['jacket', 'sweater', 'camouflage'], dtype=object),\n",
       " array(['sink', 'dishwasher', 'bathtub'], dtype=object),\n",
       " array(['oven', 'dishwasher', 'microwave'], dtype=object),\n",
       " array(['bulldozer', 'tractor', 'computer'], dtype=object),\n",
       " array(['underwear', 'mouth', 'beard'], dtype=object),\n",
       " array(['mushroom', 'flying saucer', 'helmet'], dtype=object),\n",
       " array(['golf club', 'streetlight', 'matches'], dtype=object),\n",
       " array(['leaf', 'feather', 'tennis racquet'], dtype=object),\n",
       " array(['stitches', 'ladder', 'feather'], dtype=object),\n",
       " array(['dragon', 'squirrel', 'raccoon'], dtype=object),\n",
       " array(['stove', 'radio', 'oven'], dtype=object),\n",
       " array(['baseball', 'basketball', 'baseball bat'], dtype=object),\n",
       " array(['tree', 'broccoli', 'palm tree'], dtype=object),\n",
       " array(['river', 'waterslide', 'The Great Wall of China'], dtype=object),\n",
       " array(['oven', 'dishwasher', 'microwave'], dtype=object),\n",
       " array(['sandwich', 'hot dog', 'hamburger'], dtype=object),\n",
       " array(['sun', 'spider', 'flashlight'], dtype=object),\n",
       " array(['stethoscope', 'headphones', 'necklace'], dtype=object),\n",
       " array(['skull', 'mushroom', 'light bulb'], dtype=object),\n",
       " array(['swing set', 'chair', 'see saw'], dtype=object),\n",
       " array(['canoe', 'string bean', 'banana'], dtype=object),\n",
       " array(['dolphin', 'whale', 'shark'], dtype=object),\n",
       " array(['The Mona Lisa', 'sandwich', 'camouflage'], dtype=object),\n",
       " array(['purse', 'basket', 'bucket'], dtype=object),\n",
       " array(['asparagus', 'carrot', 'peas'], dtype=object),\n",
       " array(['bicycle', 'motorbike', 'wheel'], dtype=object),\n",
       " array(['swing set', 'table', 'bench'], dtype=object),\n",
       " array(['calendar', 'spreadsheet', 'keyboard'], dtype=object),\n",
       " array(['helicopter', 'submarine', 'skyscraper'], dtype=object),\n",
       " array(['spider', 'scorpion', 'mosquito'], dtype=object),\n",
       " array(['bandage', 'dresser', 'remote control'], dtype=object),\n",
       " array(['toothbrush', 'toothpaste', 'bush'], dtype=object),\n",
       " array(['basket', 'drums', 'bottlecap'], dtype=object),\n",
       " array(['dumbbell', 'power outlet', 'shovel'], dtype=object),\n",
       " array(['fork', 'rake', 'broom'], dtype=object),\n",
       " array(['snowman', 'wristwatch', 'hourglass'], dtype=object),\n",
       " array(['bird', 'duck', 'parrot'], dtype=object),\n",
       " array(['streetlight', 'traffic light', 'floor lamp'], dtype=object),\n",
       " array(['mushroom', 'broccoli', 'palm tree'], dtype=object),\n",
       " array(['violin', 'guitar', 'cello'], dtype=object),\n",
       " array(['dog', 'rabbit', 'elephant'], dtype=object),\n",
       " array(['hand', 'finger', 'arm'], dtype=object),\n",
       " array(['bandage', 'remote control', 'cell phone'], dtype=object),\n",
       " array(['hourglass', 'vase', 'wine glass'], dtype=object),\n",
       " array(['shoe', 'pool', 'pickup truck'], dtype=object),\n",
       " array(['palm tree', 'chandelier', 'drill'], dtype=object),\n",
       " array(['chair', 'bench', 'chandelier'], dtype=object),\n",
       " array(['pear', 'apple', 'hot air balloon'], dtype=object),\n",
       " array(['sink', 'dishwasher', 'golf club'], dtype=object),\n",
       " array(['cannon', 'stethoscope', 'see saw'], dtype=object),\n",
       " array(['trombone', 'trumpet', 'bulldozer'], dtype=object),\n",
       " array(['tent', 'bridge', 'barn'], dtype=object),\n",
       " array(['drill', 'screwdriver', 'hexagon'], dtype=object),\n",
       " array(['dolphin', 'sea turtle', 'whale'], dtype=object),\n",
       " array(['postcard', 'passport', 'envelope'], dtype=object),\n",
       " array(['axe', 'mailbox', 'hammer'], dtype=object),\n",
       " array(['camera', 'cannon', 'washing machine'], dtype=object),\n",
       " array(['sandwich', 'hot dog', 'hamburger'], dtype=object),\n",
       " array(['lollipop', 'popsicle', 'onion'], dtype=object),\n",
       " array(['diving board', 'lighthouse', 'pool'], dtype=object),\n",
       " array(['moon', 'soccer ball', 'cookie'], dtype=object),\n",
       " array(['panda', 'raccoon', 'teddy-bear'], dtype=object),\n",
       " array(['windmill', 'palm tree', 'fan'], dtype=object),\n",
       " array(['banana', 'axe', 'parrot'], dtype=object),\n",
       " array(['ice cream', 'carrot', 'popsicle'], dtype=object),\n",
       " array(['raccoon', 'panda', 'owl'], dtype=object),\n",
       " array(['circle', 'moon', 'potato'], dtype=object),\n",
       " array(['cooler', 'radio', 'stereo'], dtype=object),\n",
       " array(['ceiling fan', 'windmill', 'fan'], dtype=object),\n",
       " array(['house', 'barn', 'hospital'], dtype=object),\n",
       " array(['lion', 'tiger', 'camouflage'], dtype=object),\n",
       " array(['axe', 'toothbrush', 'hammer'], dtype=object),\n",
       " array(['power outlet', 'remote control', 'cell phone'], dtype=object),\n",
       " array(['moustache', 'squiggle', 'ocean'], dtype=object),\n",
       " array(['sheep', 'hedgehog', 'bear'], dtype=object),\n",
       " array(['hockey puck', 'bottlecap', 'pool'], dtype=object),\n",
       " array(['basketball', 'baseball', 'wheel'], dtype=object),\n",
       " array(['shoe', 'foot', 'moustache'], dtype=object),\n",
       " array(['cow', 'horse', 'goatee'], dtype=object),\n",
       " array(['flip flops', 'steak', 'paper clip'], dtype=object),\n",
       " array(['steak', 'pond', 'potato'], dtype=object),\n",
       " array(['soccer ball', 'baseball', 'basketball'], dtype=object),\n",
       " array(['clock', 'compass', 'wheel'], dtype=object),\n",
       " array(['jail', 'camouflage', 'animal migration'], dtype=object),\n",
       " array(['baseball bat', 'bat', 'baseball'], dtype=object),\n",
       " array(['skyscraper', 'asparagus', 'spreadsheet'], dtype=object),\n",
       " array(['nail', 'finger', 'hand'], dtype=object),\n",
       " array(['raccoon', 'tiger', 'cow'], dtype=object),\n",
       " array(['bottlecap', 'lion', 'bracelet'], dtype=object),\n",
       " array(['fork', 'rake', 'broom'], dtype=object),\n",
       " array(['piano', 'bridge', 'keyboard'], dtype=object),\n",
       " array(['campfire', 'fireplace', 'firetruck'], dtype=object),\n",
       " array(['clock', 'compass', 'wristwatch'], dtype=object),\n",
       " array(['traffic light', 'streetlight', 'stereo'], dtype=object),\n",
       " array(['dolphin', 'whale', 'parrot'], dtype=object),\n",
       " array(['cello', 'violin', 'guitar'], dtype=object),\n",
       " array(['potato', 'cookie', 'watermelon'], dtype=object),\n",
       " array(['roller coaster', 'diving board', 'motorbike'], dtype=object),\n",
       " array(['giraffe', 'cow', 'zebra'], dtype=object),\n",
       " array(['clock', 'compass', 'wheel'], dtype=object),\n",
       " array(['camouflage', 'jacket', 'sweater'], dtype=object),\n",
       " array(['waterslide', 'river', 'tornado'], dtype=object),\n",
       " array(['barn', 'couch', 'oven'], dtype=object),\n",
       " array(['cake', 'birthday cake', 'candle'], dtype=object),\n",
       " array(['whale', 'dolphin', 'wheel'], dtype=object),\n",
       " array(['bowtie', 'bat', 'butterfly'], dtype=object),\n",
       " array(['trumpet', 'trombone', 'clarinet'], dtype=object),\n",
       " array(['tree', 'broccoli', 'palm tree'], dtype=object),\n",
       " array(['coffee cup', 'cup', 'mug'], dtype=object),\n",
       " array(['fan', 'cooler', 'ceiling fan'], dtype=object),\n",
       " array(['broom', 'paintbrush', 'rake'], dtype=object),\n",
       " array(['flip flops', 'basketball', 'mouse'], dtype=object),\n",
       " array(['hexagon', 'octagon', 'square'], dtype=object),\n",
       " array(['bicycle', 'motorbike', 'popsicle'], dtype=object),\n",
       " array(['feather', 'leaf', 'sword'], dtype=object),\n",
       " array(['calendar', 'calculator', 'chandelier'], dtype=object),\n",
       " array(['monkey', 'panda', 'raccoon'], dtype=object),\n",
       " array(['soccer ball', 'basketball', 'camouflage'], dtype=object),\n",
       " array(['broom', 'paintbrush', 'rake'], dtype=object),\n",
       " array(['microphone', 'tennis racquet', 'megaphone'], dtype=object),\n",
       " array(['passport', 'postcard', 'book'], dtype=object),\n",
       " array(['helmet', 'face', 'couch'], dtype=object),\n",
       " array(['lightning', 'flashlight', 'power outlet'], dtype=object),\n",
       " array(['underwear', 'pants', 'anvil'], dtype=object),\n",
       " array(['lantern', 'floor lamp', 'lighthouse'], dtype=object),\n",
       " array(['barn', 'garden hose', 'castle'], dtype=object),\n",
       " array(['roller coaster', 'The Great Wall of China', 'rollerskates'],\n",
       "       dtype=object),\n",
       " array(['dishwasher', 'calculator', 'oven'], dtype=object),\n",
       " array(['speedboat', 'cruise ship', 'sailboat'], dtype=object),\n",
       " array(['hamburger', 'sandwich', 'bottlecap'], dtype=object),\n",
       " array(['The Great Wall of China', 'castle', 'fence'], dtype=object),\n",
       " array(['dumbbell', 'bed', 'bridge'], dtype=object),\n",
       " array(['lightning', 'zigzag', 'flashlight'], dtype=object),\n",
       " array(['rainbow', 'bridge', 'banana'], dtype=object),\n",
       " array(['stethoscope', 'headphones', 'nose'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['marker', 'paintbrush', 'toothpaste'], dtype=object),\n",
       " array(['headphones', 'face', 'ear'], dtype=object),\n",
       " array(['pig', 'cow', 'bear'], dtype=object),\n",
       " array(['piano', 'keyboard', 'The Great Wall of China'], dtype=object),\n",
       " array(['mailbox', 'mushroom', 'microphone'], dtype=object),\n",
       " array(['mountain', 'helmet', 'hat'], dtype=object),\n",
       " array(['grapes', 'blackberry', 'blueberry'], dtype=object),\n",
       " array(['steak', 'watermelon', 'harp'], dtype=object),\n",
       " array(['eye', 'pond', 'hurricane'], dtype=object),\n",
       " array(['stove', 'oven', 'cooler'], dtype=object),\n",
       " array(['pool', 'sink', 'diving board'], dtype=object),\n",
       " array(['wine glass', 'wine bottle', 'cup'], dtype=object),\n",
       " array(['pool', 'hot tub', 'bathtub'], dtype=object),\n",
       " array(['pliers', 'scissors', 'airplane'], dtype=object),\n",
       " array(['tornado', 'hurricane', 'drill'], dtype=object),\n",
       " array(['bread', 'beard', 'sandwich'], dtype=object),\n",
       " array(['peas', 'string bean', 'canoe'], dtype=object),\n",
       " array(['foot', 'toe', 'hand'], dtype=object),\n",
       " array(['sheep', 'hedgehog', 'cloud'], dtype=object),\n",
       " array(['see saw', 'giraffe', 'stethoscope'], dtype=object),\n",
       " array(['camel', 'giraffe', 'rhinoceros'], dtype=object),\n",
       " array(['diamond', 'parachute', 'eraser'], dtype=object),\n",
       " array(['donut', 'steak', 'flying saucer'], dtype=object),\n",
       " array(['crown', 'castle', 'church'], dtype=object),\n",
       " array(['broom', 'paintbrush', 'rake'], dtype=object),\n",
       " array(['snowman', 'penguin', 'frog'], dtype=object),\n",
       " array(['axe', 'megaphone', 'shovel'], dtype=object),\n",
       " array(['helicopter', 'submarine', 'airplane'], dtype=object),\n",
       " array(['pond', 'watermelon', 'pool'], dtype=object),\n",
       " array(['star', 'snowflake', 'stairs'], dtype=object),\n",
       " array(['umbrella', 'mailbox', 'parachute'], dtype=object),\n",
       " array(['mouse', 'moustache', 'hot air balloon'], dtype=object),\n",
       " array(['snowflake', 'cooler', 'snowman'], dtype=object),\n",
       " array(['windmill', 'fan', 'palm tree'], dtype=object),\n",
       " array(['saw', 'key', 'see saw'], dtype=object),\n",
       " array(['asparagus', 'carrot', 'fork'], dtype=object),\n",
       " array(['trumpet', 'trombone', 'clarinet'], dtype=object),\n",
       " array(['windmill', 'ceiling fan', 'fan'], dtype=object),\n",
       " array(['umbrella', 'parachute', 'sailboat'], dtype=object),\n",
       " array(['mushroom', 'microphone', 'hat'], dtype=object),\n",
       " array(['bucket', 'purse', 'basket'], dtype=object),\n",
       " array(['toe', 'finger', 'beard'], dtype=object),\n",
       " array(['matches', 'paintbrush', 'candle'], dtype=object),\n",
       " array(['television', 'radio', 'stereo'], dtype=object),\n",
       " array(['pig', 'bear', 'panda'], dtype=object),\n",
       " array(['ice cream', 'cactus', 'snowman'], dtype=object),\n",
       " array(['ice cream', 'microphone', 'basket'], dtype=object),\n",
       " array(['diamond', 'fan', 'hexagon'], dtype=object),\n",
       " array(['butterfly', 'bee', 'mosquito'], dtype=object),\n",
       " array(['scissors', 'pliers', 'rabbit'], dtype=object),\n",
       " array(['cruise ship', 'submarine', 'speedboat'], dtype=object),\n",
       " array(['pear', 'peas', 'apple'], dtype=object),\n",
       " array(['leaf', 'feather', 'peas'], dtype=object),\n",
       " array(['pond', 'pool', 'steak'], dtype=object),\n",
       " array(['church', 'hospital', 'house'], dtype=object),\n",
       " array(['mailbox', 'flamingo', 'rollerskates'], dtype=object),\n",
       " array(['bat', 'dragon', 'owl'], dtype=object),\n",
       " array(['tree', 'broccoli', 'flower'], dtype=object),\n",
       " array(['sun', 'flashlight', 'moon'], dtype=object),\n",
       " array(['eraser', 'laptop', 'bread'], dtype=object),\n",
       " array(['lipstick', 'marker', 'lantern'], dtype=object),\n",
       " array(['light bulb', 'flashlight', 'lantern'], dtype=object),\n",
       " array(['blackberry', 'cell phone', 'calculator'], dtype=object),\n",
       " array(['remote control', 'calculator', 'calendar'], dtype=object),\n",
       " array(['dog', 'elephant', 'backpack'], dtype=object),\n",
       " array(['rake', 'fork', 'broom'], dtype=object),\n",
       " array(['scorpion', 'lobster', 'frog'], dtype=object),\n",
       " array(['teddy-bear', 'bear', 'panda'], dtype=object),\n",
       " array(['yoga', 'sleeping bag', 'floor lamp'], dtype=object),\n",
       " array(['violin', 'guitar', 'cello'], dtype=object),\n",
       " array(['cooler', 'firetruck', 'suitcase'], dtype=object),\n",
       " array(['peanut', 'cello', 'violin'], dtype=object),\n",
       " array(['calendar', 'laptop', 'calculator'], dtype=object),\n",
       " array(['envelope', 'postcard', 'mailbox'], dtype=object),\n",
       " array(['violin', 'guitar', 'cello'], dtype=object),\n",
       " array(['basketball', 'baseball', 'soccer ball'], dtype=object),\n",
       " array(['cannon', 'stethoscope', 'canoe'], dtype=object),\n",
       " array(['church', 'barn', 'tent'], dtype=object),\n",
       " array(['moon', 'banana', 'boomerang'], dtype=object),\n",
       " array(['crocodile', 'dragon', 'shark'], dtype=object),\n",
       " array(['jacket', 'sweater', 't-shirt'], dtype=object),\n",
       " array(['backpack', 'chair', 'bed'], dtype=object),\n",
       " array(['oven', 'dresser', 'microwave'], dtype=object),\n",
       " array(['laptop', 'computer', 'calendar'], dtype=object),\n",
       " array(['cat', 'raccoon', 'tiger'], dtype=object),\n",
       " array(['school bus', 'bus', 'van'], dtype=object),\n",
       " array(['house', 'barn', 'church'], dtype=object),\n",
       " array(['soccer ball', 'cookie', 'moon'], dtype=object),\n",
       " array(['finger', 'nail', 'skyscraper'], dtype=object),\n",
       " array(['washing machine', 'dishwasher', 'oven'], dtype=object),\n",
       " array(['map', 'postcard', 'passport'], dtype=object),\n",
       " array(['microphone', 'tennis racquet', 'megaphone'], dtype=object),\n",
       " array(['blueberry', 'strawberry', 'potato'], dtype=object),\n",
       " array(['blackberry', 'grapes', 'blueberry'], dtype=object),\n",
       " array(['truck', 'van', 'pickup truck'], dtype=object),\n",
       " array(['broom', 'paintbrush', 'fork'], dtype=object),\n",
       " array(['camouflage', 'brain', 'map'], dtype=object),\n",
       " array(['soccer ball', 'wheel', 'compass'], dtype=object),\n",
       " array(['parachute', 'cake', 'birthday cake'], dtype=object),\n",
       " array(['flower', 'house plant', 'garden'], dtype=object),\n",
       " array(['bear', 'mouse', 'monkey'], dtype=object),\n",
       " array(['cell phone', 'telephone', 'megaphone'], dtype=object),\n",
       " array(['ear', 'paper clip', 'toe'], dtype=object),\n",
       " array(['guitar', 'violin', 'cello'], dtype=object),\n",
       " array(['hot air balloon', 'parachute', 'tennis racquet'], dtype=object),\n",
       " array(['raccoon', 'panda', 'pig'], dtype=object),\n",
       " array(['bird', 'parrot', 'duck'], dtype=object),\n",
       " array(['vase', 'house plant', 'flower'], dtype=object),\n",
       " array(['bandage', 'telephone', 'cell phone'], dtype=object),\n",
       " array(['sock', 'shoe', 'leg'], dtype=object),\n",
       " array(['skyscraper', 'cooler', 'dresser'], dtype=object),\n",
       " array(['blueberry', 'potato', 'onion'], dtype=object),\n",
       " array(['microphone', 'megaphone', 'toothbrush'], dtype=object),\n",
       " array(['parachute', 'basket', 'helmet'], dtype=object),\n",
       " array(['cruise ship', 'speedboat', 'sailboat'], dtype=object),\n",
       " array(['bird', 'duck', 'parrot'], dtype=object),\n",
       " array(['cell phone', 'door', 'remote control'], dtype=object),\n",
       " array(['steak', 'potato', 'strawberry'], dtype=object),\n",
       " array(['apple', 'blueberry', 'pear'], dtype=object),\n",
       " array(['monkey', 'teddy-bear', 'bear'], dtype=object),\n",
       " array(['stop sign', 'octagon', 'marker'], dtype=object),\n",
       " array(['coffee cup', 'cup', 'mug'], dtype=object),\n",
       " array(['lightning', 'hurricane', 'skyscraper'], dtype=object),\n",
       " array(['duck', 'swan', 'parrot'], dtype=object),\n",
       " array(['rhinoceros', 'bear', 'raccoon'], dtype=object),\n",
       " array(['tornado', 'hurricane', 'garden hose'], dtype=object),\n",
       " array(['hexagon', 'octagon', 'house'], dtype=object),\n",
       " array(['steak', 'bread', 'hot dog'], dtype=object),\n",
       " array(['binoculars', 'stethoscope', 'pliers'], dtype=object),\n",
       " array(['postcard', 'passport', 'envelope'], dtype=object),\n",
       " array(['tennis racquet', 'microphone', 'fan'], dtype=object),\n",
       " array(['spoon', 'frying pan', 'shovel'], dtype=object),\n",
       " array(['envelope', 'postcard', 'mailbox'], dtype=object),\n",
       " array(['square', 'suitcase', 'bread'], dtype=object),\n",
       " array(['banana', 'fireplace', 'chandelier'], dtype=object),\n",
       " array(['moon', 'snowflake', 'snowman'], dtype=object),\n",
       " array(['camera', 'cannon', 'washing machine'], dtype=object),\n",
       " array(['couch', 'bench', 'binoculars'], dtype=object),\n",
       " array(['roller coaster', 'rollerskates', 'The Great Wall of China'],\n",
       "       dtype=object),\n",
       " array(['broccoli', 'blackberry', 'tree'], dtype=object),\n",
       " array(['cake', 'birthday cake', 'sandwich'], dtype=object),\n",
       " array(['stairs', 'zigzag', 'lightning'], dtype=object),\n",
       " array(['elephant', 'rhinoceros', 'dog'], dtype=object),\n",
       " array(['streetlight', 'floor lamp', 'lantern'], dtype=object),\n",
       " array(['hat', 'flying saucer', 'hamburger'], dtype=object),\n",
       " array(['lollipop', 'popsicle', 'spoon'], dtype=object),\n",
       " array(['motorbike', 'bicycle', 'tractor'], dtype=object),\n",
       " array(['tree', 'broccoli', 'palm tree'], dtype=object),\n",
       " array(['mosquito', 'spider', 'octopus'], dtype=object),\n",
       " array(['circle', 'moon', 'potato'], dtype=object),\n",
       " array(['passport', 'postcard', 'book'], dtype=object),\n",
       " array(['bridge', 'headphones', 'telephone'], dtype=object),\n",
       " array(['helmet', 'umbrella', 'parachute'], dtype=object),\n",
       " array(['owl', 'raccoon', 'panda'], dtype=object),\n",
       " array(['piano', 'belt', 'bench'], dtype=object),\n",
       " array(['hamburger', 'sandwich', 'hot dog'], dtype=object),\n",
       " array(['megaphone', 'flashlight', 'bowtie'], dtype=object),\n",
       " array(['piano', 'barn', 'bridge'], dtype=object),\n",
       " array(['fire hydrant', 'lollipop', 'camera'], dtype=object),\n",
       " array(['rabbit', 'dog', 'mouse'], dtype=object),\n",
       " array(['river', 'The Great Wall of China', 'beach'], dtype=object),\n",
       " array(['hockey stick', 'golf club', 'leg'], dtype=object),\n",
       " array(['rainbow', 'banana', 'string bean'], dtype=object),\n",
       " array(['windmill', 'fan', 'ceiling fan'], dtype=object),\n",
       " array(['microwave', 'oven', 'dishwasher'], dtype=object),\n",
       " array(['wine bottle', 'marker', 'wine glass'], dtype=object),\n",
       " array(['garden', 'sink', 'crown'], dtype=object),\n",
       " array(['potato', 'cookie', 'clock'], dtype=object),\n",
       " array(['sock', 'boomerang', 'shoe'], dtype=object),\n",
       " array(['truck', 'car', 'pickup truck'], dtype=object),\n",
       " array(['banana', 'harp', 'boomerang'], dtype=object),\n",
       " array(['umbrella', 'mushroom', 'parachute'], dtype=object),\n",
       " array(['tooth', 'pants', 'bread'], dtype=object),\n",
       " array(['suitcase', 'purse', 'cooler'], dtype=object),\n",
       " array(['coffee cup', 'cup', 'mug'], dtype=object),\n",
       " array(['pear', 'potato', 'peanut'], dtype=object),\n",
       " array(['raccoon', 'panda', 'tiger'], dtype=object),\n",
       " array(['washing machine', 'fire hydrant', 'cooler'], dtype=object),\n",
       " array(['remote control', 'skyscraper', 'calendar'], dtype=object),\n",
       " array(['snake', 'garden hose', 'moustache'], dtype=object),\n",
       " array(['steak', 'ear', 'pool'], dtype=object),\n",
       " array(['nail', 'toe', 'finger'], dtype=object),\n",
       " array(['diving board', 'pool', 'waterslide'], dtype=object),\n",
       " array(['snorkel', 'hockey puck', 'toothpaste'], dtype=object),\n",
       " array(['elbow', 'arm', 'knee'], dtype=object),\n",
       " array(['rainbow', 'bridge', 'banana'], dtype=object),\n",
       " array(['barn', 'garden', 'castle'], dtype=object),\n",
       " array(['crab', 'lobster', 'scorpion'], dtype=object),\n",
       " array(['garden hose', 'waterslide', 'trombone'], dtype=object),\n",
       " array(['hot tub', 'steak', 'bathtub'], dtype=object),\n",
       " array(['cactus', 'house plant', 'banana'], dtype=object),\n",
       " array(['octopus', 'octagon', 'moustache'], dtype=object),\n",
       " array(['dishwasher', 'stove', 'oven'], dtype=object),\n",
       " array(['harp', 'cello', 'tennis racquet'], dtype=object),\n",
       " array(['stitches', 'ladder', 'feather'], dtype=object),\n",
       " array(['pineapple', 'strawberry', 'onion'], dtype=object),\n",
       " array(['frying pan', 'speedboat', 'saw'], dtype=object),\n",
       " array(['broccoli', 'tree', 'hand'], dtype=object),\n",
       " array(['toothpaste', 'marker', 'toothbrush'], dtype=object),\n",
       " array(['eyeglasses', 'hourglass', 'binoculars'], dtype=object),\n",
       " array(['moustache', 'nose', 'chandelier'], dtype=object),\n",
       " array(['flip flops', 'diving board', 'paper clip'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['strawberry', 'ice cream', 'carrot'], dtype=object),\n",
       " array(['chair', 'bench', 'cooler'], dtype=object),\n",
       " array(['pizza', 'watermelon', 'strawberry'], dtype=object),\n",
       " array(['roller coaster', 'The Great Wall of China', 'rollerskates'],\n",
       "       dtype=object),\n",
       " array(['harp', 'cello', 'onion'], dtype=object),\n",
       " array(['underwear', 'pants', 'shorts'], dtype=object),\n",
       " array(['fireplace', 'oven', 'stove'], dtype=object),\n",
       " array(['tent', 'eraser', 'pool'], dtype=object),\n",
       " array(['cookie', 'moon', 'potato'], dtype=object),\n",
       " array(['stairs', 'ladder', 'The Eiffel Tower'], dtype=object),\n",
       " array(['spider', 'ant', 'mosquito'], dtype=object),\n",
       " array(['boomerang', 'knee', 'moon'], dtype=object),\n",
       " array(['hockey stick', 'golf club', 'streetlight'], dtype=object),\n",
       " array(['triangle', 'diamond', 'mountain'], dtype=object),\n",
       " array(['sword', 'screwdriver', 'violin'], dtype=object),\n",
       " array(['paintbrush', 'broom', 'shovel'], dtype=object),\n",
       " array(['lollipop', 'popsicle', 'fan'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['stethoscope', 'headphones', 'chandelier'], dtype=object),\n",
       " array(['bridge', 'roller coaster', 'The Great Wall of China'],\n",
       "       dtype=object),\n",
       " array(['fireplace', 'stove', 'campfire'], dtype=object),\n",
       " array(['mouth', 'tooth', 'bracelet'], dtype=object),\n",
       " array(['watermelon', 'pizza', 'cake'], dtype=object),\n",
       " array(['raccoon', 'owl', 'stove'], dtype=object),\n",
       " array(['train', 'pickup truck', 'tractor'], dtype=object),\n",
       " array(['belt', 'wristwatch', 'bandage'], dtype=object),\n",
       " array(['television', 'alarm clock', 'wristwatch'], dtype=object),\n",
       " array(['toothpaste', 'marker', 'bathtub'], dtype=object),\n",
       " array(['rain', 'cloud', 'lightning'], dtype=object),\n",
       " array(['The Great Wall of China', 'castle', 'fence'], dtype=object),\n",
       " array(['saxophone', 'trombone', 'clarinet'], dtype=object),\n",
       " array(['cello', 'violin', 'guitar'], dtype=object),\n",
       " array(['tiger', 'raccoon', 'panda'], dtype=object),\n",
       " array(['bottlecap', 'hockey puck', 'sandwich'], dtype=object),\n",
       " array(['compass', 'clock', 'goatee'], dtype=object),\n",
       " array(['tornado', 'hurricane', 'camouflage'], dtype=object),\n",
       " array(['diamond', 'drums', 'basket'], dtype=object),\n",
       " array(['leg', 'foot', 'knee'], dtype=object),\n",
       " array(['bed', 'spreadsheet', 'oven'], dtype=object),\n",
       " array(['nose', 'golf club', 'streetlight'], dtype=object),\n",
       " array(['beard', 'goatee', 'lion'], dtype=object),\n",
       " array(['rhinoceros', 'cow', 'bear'], dtype=object),\n",
       " array(['golf club', 'hockey stick', 'axe'], dtype=object),\n",
       " array(['blackberry', 'blueberry', 'rake'], dtype=object),\n",
       " array(['cow', 'horse', 'zebra'], dtype=object),\n",
       " array(['elbow', 'arm', 'boomerang'], dtype=object),\n",
       " array(['crayon', 'pencil', 'marker'], dtype=object),\n",
       " array(['paint can', 'paintbrush', 'cup'], dtype=object),\n",
       " array(['whale', 'dolphin', 'fish'], dtype=object),\n",
       " array(['door', 'stereo', 'fire hydrant'], dtype=object),\n",
       " array(['sleeping bag', 'toothpaste', 'marker'], dtype=object),\n",
       " array(['trombone', 'trumpet', 'saxophone'], dtype=object),\n",
       " array(['dresser', 'oven', 'power outlet'], dtype=object),\n",
       " array(['stop sign', 'fan', 'frying pan'], dtype=object),\n",
       " array(['lion', 'sheep', 'tiger'], dtype=object),\n",
       " array(['crab', 'lobster', 'scorpion'], dtype=object),\n",
       " array(['tornado', 'hurricane', 'garden hose'], dtype=object),\n",
       " array(['mouth', 'peanut', 'steak'], dtype=object),\n",
       " array(['triangle', 'nose', 'tent'], dtype=object),\n",
       " array(['bridge', 'The Great Wall of China', 'river'], dtype=object),\n",
       " array(['mosquito', 'ant', 'spider'], dtype=object),\n",
       " array(['broom', 'paintbrush', 'rake'], dtype=object),\n",
       " array(['compass', 'clock', 'screwdriver'], dtype=object),\n",
       " array(['tree', 'broccoli', 'flower'], dtype=object),\n",
       " array(['owl', 'penguin', 'parrot'], dtype=object),\n",
       " array(['cake', 'birthday cake', 'chandelier'], dtype=object),\n",
       " array(['stethoscope', 'headphones', 'scorpion'], dtype=object),\n",
       " array(['ambulance', 'firetruck', 'hospital'], dtype=object),\n",
       " array(['spider', 'crab', 'mosquito'], dtype=object),\n",
       " array(['bathtub', 'hot tub', 'pool'], dtype=object),\n",
       " array(['bus', 'school bus', 'van'], dtype=object),\n",
       " array(['drums', 'trombone', 'radio'], dtype=object),\n",
       " array(['pond', 'pool', 'watermelon'], dtype=object),\n",
       " array(['dolphin', 'shark', 'horse'], dtype=object),\n",
       " array(['shark', 'dolphin', 'whale'], dtype=object),\n",
       " array(['chair', 'axe', 'diving board'], dtype=object),\n",
       " array(['rollerskates', 'roller coaster', 'chandelier'], dtype=object),\n",
       " array(['cat', 'tiger', 'raccoon'], dtype=object),\n",
       " array(['yoga', 'kangaroo', 'monkey'], dtype=object),\n",
       " array(['dumbbell', 'trumpet', 'trombone'], dtype=object),\n",
       " array(['sock', 'leg', 'hockey stick'], dtype=object),\n",
       " array(['tennis racquet', 'microphone', 'popsicle'], dtype=object),\n",
       " array(['bandage', 'dresser', 'stitches'], dtype=object),\n",
       " array(['clarinet', 'trumpet', 'string bean'], dtype=object),\n",
       " array(['snail', 'nail', 'bee'], dtype=object),\n",
       " array(['school bus', 'bus', 'van'], dtype=object),\n",
       " array(['octagon', 'hexagon', 'stop sign'], dtype=object),\n",
       " array(['goatee', 'beard', 'tooth'], dtype=object),\n",
       " array(['beach', 'ocean', 'hurricane'], dtype=object),\n",
       " array(['parrot', 'bird', 'duck'], dtype=object),\n",
       " array(['wheel', 'eye', 'fan'], dtype=object),\n",
       " array(['passport', 'postcard', 'calendar'], dtype=object),\n",
       " array(['windmill', 'fan', 'ceiling fan'], dtype=object),\n",
       " array(['radio', 'stereo', 'megaphone'], dtype=object),\n",
       " array(['pizza', 'watermelon', 'camouflage'], dtype=object),\n",
       " array(['crocodile', 'dragon', 'rhinoceros'], dtype=object),\n",
       " array(['fan', 'cooler', 'ceiling fan'], dtype=object),\n",
       " array(['bottlecap', 'hot air balloon', 'vase'], dtype=object),\n",
       " array(['eraser', 'marker', 'bandage'], dtype=object),\n",
       " array(['flying saucer', 'laptop', 'cruise ship'], dtype=object),\n",
       " array(['bridge', 'piano', 'keyboard'], dtype=object),\n",
       " array(['mailbox', 'axe', 'snorkel'], dtype=object),\n",
       " array(['cactus', 'chandelier', 'sweater'], dtype=object),\n",
       " array(['teapot', 'coffee cup', 'cup'], dtype=object),\n",
       " array(['submarine', 'snorkel', 'golf club'], dtype=object),\n",
       " array(['toilet', 'ice cream', 'chair'], dtype=object),\n",
       " array(['diamond', 'wristwatch', 'lantern'], dtype=object),\n",
       " array(['snake', 'garden hose', 'moustache'], dtype=object),\n",
       " array(['The Eiffel Tower', 'compass', 'pliers'], dtype=object),\n",
       " array(['scorpion', 'lobster', 'crab'], dtype=object),\n",
       " array(['sheep', 'hedgehog', 'cloud'], dtype=object),\n",
       " array(['cello', 'violin', 'guitar'], dtype=object),\n",
       " array(['door', 'skyscraper', 'cooler'], dtype=object),\n",
       " array(['grapes', 'blackberry', 'blueberry'], dtype=object),\n",
       " array(['skull', 'mushroom', 'broccoli'], dtype=object),\n",
       " array(['airplane', 'pliers', 'scissors'], dtype=object),\n",
       " array(['cell phone', 'telephone', 'blackberry'], dtype=object),\n",
       " array(['grapes', 'blackberry', 'blueberry'], dtype=object),\n",
       " array(['pineapple', 'onion', 'strawberry'], dtype=object),\n",
       " array(['wheel', 'pizza', 'cooler'], dtype=object),\n",
       " array(['fan', 'cooler', 'ceiling fan'], dtype=object),\n",
       " array(['raccoon', 'cat', 'tiger'], dtype=object),\n",
       " array(['suitcase', 'cooler', 'tractor'], dtype=object),\n",
       " array(['pickup truck', 'truck', 'train'], dtype=object),\n",
       " array(['frog', 'monkey', 'panda'], dtype=object),\n",
       " array(['tree', 'broccoli', 'palm tree'], dtype=object),\n",
       " array(['octagon', 'circle', 'hexagon'], dtype=object),\n",
       " array(['bread', 'beard', 'paint can'], dtype=object),\n",
       " array(['harp', 'cello', 'violin'], dtype=object),\n",
       " array(['cello', 'violin', 'guitar'], dtype=object),\n",
       " array(['radio', 'stereo', 'stove'], dtype=object),\n",
       " array(['bracelet', 'potato', 'blueberry'], dtype=object),\n",
       " array(['rollerskates', 'roller coaster', 'skateboard'], dtype=object),\n",
       " array(['clock', 'compass', 'blueberry'], dtype=object),\n",
       " array(['wine bottle', 'popsicle', 'wine glass'], dtype=object),\n",
       " array(['piano', 'bench', 'couch'], dtype=object),\n",
       " array(['brain', 'hot tub', 'bathtub'], dtype=object),\n",
       " array(['airplane', 'helicopter', 'shark'], dtype=object),\n",
       " array(['garden', 'garden hose', 'house plant'], dtype=object),\n",
       " array(['suitcase', 'cooler', 'calendar'], dtype=object),\n",
       " array(['washing machine', 'dishwasher', 'oven'], dtype=object),\n",
       " array(['owl', 'panda', 'raccoon'], dtype=object),\n",
       " array(['lantern', 'lighthouse', 'floor lamp'], dtype=object),\n",
       " array(['drill', 'screwdriver', 'nail'], dtype=object),\n",
       " array(['donut', 'wheel', 'hurricane'], dtype=object),\n",
       " array(['parachute', 'diamond', 'umbrella'], dtype=object),\n",
       " array(['campfire', 'fireplace', 'fire hydrant'], dtype=object),\n",
       " array(['baseball', 'basketball', 'backpack'], dtype=object),\n",
       " array(['face', 'smiley face', 'The Mona Lisa'], dtype=object),\n",
       " array(['ant', 'spider', 'bee'], dtype=object),\n",
       " array(['bicycle', 'motorbike', 'tractor'], dtype=object),\n",
       " array(['picture frame', 'oven', 'dishwasher'], dtype=object),\n",
       " array(['cup', 'mug', 'coffee cup'], dtype=object),\n",
       " array(['calendar', 'spreadsheet', 'chandelier'], dtype=object),\n",
       " array(['octagon', 'hexagon', 'stop sign'], dtype=object),\n",
       " array(['fence', 'skyscraper', 'castle'], dtype=object),\n",
       " array(['eyeglasses', 'hourglass', 'snorkel'], dtype=object),\n",
       " array(['line', 'octagon', 'ocean'], dtype=object),\n",
       " array(['cello', 'violin', 'guitar'], dtype=object),\n",
       " array(['stove', 'toaster', 'oven'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['cactus', 'palm tree', 'broccoli'], dtype=object),\n",
       " array(['baseball bat', 'bat', 'hockey stick'], dtype=object),\n",
       " array(['lollipop', 'popsicle', 'stop sign'], dtype=object),\n",
       " array(['computer', 'television', 'laptop'], dtype=object),\n",
       " array(['cat', 'tiger', 'dog'], dtype=object),\n",
       " array(['megaphone', 'flashlight', 'microphone'], dtype=object),\n",
       " array(['oven', 'dishwasher', 'stove'], dtype=object),\n",
       " array(['passport', 'postcard', 'cell phone'], dtype=object),\n",
       " array(['traffic light', 'streetlight', 'remote control'], dtype=object),\n",
       " array(['rake', 'fork', 'broom'], dtype=object),\n",
       " array(['necklace', 'pliers', 'stethoscope'], dtype=object),\n",
       " array(['castle', 'church', 'The Great Wall of China'], dtype=object),\n",
       " array(['trumpet', 'flashlight', 'trombone'], dtype=object),\n",
       " array(['hockey puck', 'pool', 'bottlecap'], dtype=object),\n",
       " array(['banana', 'palm tree', 'pliers'], dtype=object),\n",
       " array(['cooler', 'stereo', 'radio'], dtype=object),\n",
       " array(['ocean', 'squiggle', 'moustache'], dtype=object),\n",
       " array(['sword', 'bowtie', 'mermaid'], dtype=object),\n",
       " array(['pliers', 'boomerang', 'elbow'], dtype=object),\n",
       " array(['giraffe', 'zebra', 'skyscraper'], dtype=object),\n",
       " array(['skateboard', 'rollerskates', 'roller coaster'], dtype=object),\n",
       " array(['flower', 'lion', 'blackberry'], dtype=object),\n",
       " array(['marker', 'candle', 'skyscraper'], dtype=object),\n",
       " array(['hexagon', 'octagon', 'garden hose'], dtype=object),\n",
       " array(['trumpet', 'trombone', 'clarinet'], dtype=object),\n",
       " array(['pants', 'shorts', 'underwear'], dtype=object),\n",
       " array(['penguin', 'parrot', 'bear'], dtype=object),\n",
       " array(['sweater', 't-shirt', 'jacket'], dtype=object),\n",
       " array(['shorts', 'underwear', 'pants'], dtype=object),\n",
       " array(['bus', 'school bus', 'van'], dtype=object),\n",
       " array(['shovel', 'mushroom', 'mailbox'], dtype=object),\n",
       " array(['sea turtle', 'tiger', 'zebra'], dtype=object),\n",
       " array(['book', 'passport', 'shorts'], dtype=object),\n",
       " array(['helmet', 'basket', 'bucket'], dtype=object),\n",
       " array(['fire hydrant', 'lantern', 'lighthouse'], dtype=object),\n",
       " array(['bus', 'school bus', 'van'], dtype=object),\n",
       " array(['compass', 'pond', 'pool'], dtype=object),\n",
       " array(['helicopter', 'submarine', 'airplane'], dtype=object),\n",
       " array(['parrot', 'penguin', 'kangaroo'], dtype=object),\n",
       " array(['eyeglasses', 'binoculars', 'nail'], dtype=object),\n",
       " array(['matches', 'paintbrush', 'paint can'], dtype=object),\n",
       " array(['popsicle', 'screwdriver', 'ice cream'], dtype=object),\n",
       " array(['cookie', 'potato', 'moon'], dtype=object),\n",
       " array(['sandwich', 'beard', 'bread'], dtype=object),\n",
       " array(['underwear', 'pants', 'shorts'], dtype=object),\n",
       " array(['tornado', 'hurricane', 'camouflage'], dtype=object),\n",
       " array(['pizza', 'map', 'nose'], dtype=object),\n",
       " array(['necklace', 'bracelet', 'grapes'], dtype=object),\n",
       " array(['backpack', 'dog', 'panda'], dtype=object),\n",
       " array(['stop sign', 'marker', 'dumbbell'], dtype=object),\n",
       " array(['carrot', 'drill', 'feather'], dtype=object),\n",
       " array(['zigzag', 'squiggle', 'mountain'], dtype=object),\n",
       " array(['cookie', 'potato', 'flying saucer'], dtype=object),\n",
       " array(['stove', 'oven', 'cooler'], dtype=object),\n",
       " array(['fence', 'garden', 'The Great Wall of China'], dtype=object),\n",
       " array(['sock', 'shoe', 'toe'], dtype=object),\n",
       " array(['tooth', 'pliers', 'star'], dtype=object),\n",
       " array(['table', 'bench', 'piano'], dtype=object),\n",
       " array(['cake', 'birthday cake', 'hot tub'], dtype=object),\n",
       " array(['toilet', 'bandage', 'fire hydrant'], dtype=object),\n",
       " array(['binoculars', 'eyeglasses', 'snorkel'], dtype=object),\n",
       " array(['pliers', 'pants', 'chandelier'], dtype=object),\n",
       " array(['keyboard', 'computer', 'laptop'], dtype=object),\n",
       " array(['toilet', 'scissors', 'dog'], dtype=object),\n",
       " array(['cooler', 'piano', 'sink'], dtype=object),\n",
       " array(['basketball', 'soccer ball', 'baseball'], dtype=object),\n",
       " array(['teddy-bear', 'bear', 'panda'], dtype=object),\n",
       " array(['waterslide', 'skyscraper', 'river'], dtype=object),\n",
       " array(['shoe', 'waterslide', 'foot'], dtype=object),\n",
       " array(['horse', 'zebra', 'dragon'], dtype=object),\n",
       " array(['cookie', 'potato', 'watermelon'], dtype=object),\n",
       " array(['baseball', 'basketball', 'watermelon'], dtype=object),\n",
       " array(['blueberry', 'potato', 'moon'], dtype=object),\n",
       " array(['firetruck', 'pickup truck', 'fire hydrant'], dtype=object),\n",
       " array(['chandelier', 'rake', 'calendar'], dtype=object),\n",
       " array(['belt', 'bandage', 'clarinet'], dtype=object),\n",
       " array(['beach', 'ocean', 'river'], dtype=object),\n",
       " array(['map', 'stitches', 'pillow'], dtype=object),\n",
       " array(['eyeglasses', 'binoculars', 'blueberry'], dtype=object),\n",
       " array(['hot dog', 'backpack', 'flip flops'], dtype=object),\n",
       " array(['snowflake', 'stitches', 'cooler'], dtype=object),\n",
       " array(['paintbrush', 'broom', 'bush'], dtype=object),\n",
       " array(['pineapple', 'onion', 'strawberry'], dtype=object),\n",
       " array(['barn', 'house', 'church'], dtype=object),\n",
       " array(['candle', 'chandelier', 'wine bottle'], dtype=object),\n",
       " array(['harp', 'watermelon', 'onion'], dtype=object),\n",
       " array(['bulldozer', 'camera', 'tractor'], dtype=object),\n",
       " array(['ear', 'snake', 'squiggle'], dtype=object),\n",
       " array(['bench', 'couch', 'piano'], dtype=object),\n",
       " array(['binoculars', 'eyeglasses', 'hourglass'], dtype=object),\n",
       " array(['laptop', 'calendar', 'computer'], dtype=object),\n",
       " array(['donut', 'steak', 'blueberry'], dtype=object),\n",
       " array(['crown', 'castle', 'church'], dtype=object),\n",
       " array(['light bulb', 'hot air balloon', 'lightning'], dtype=object),\n",
       " array(['piano', 'oven', 'stove'], dtype=object),\n",
       " array(['hot tub', 'bathtub', 'hockey puck'], dtype=object),\n",
       " array(['hot air balloon', 'parachute', 'skull'], dtype=object),\n",
       " array(['sailboat', 'speedboat', 'cruise ship'], dtype=object),\n",
       " array(['bicycle', 'motorbike', 'skateboard'], dtype=object),\n",
       " array(['steak', 'sleeping bag', 'peanut'], dtype=object),\n",
       " array(['horse', 'zebra', 'chandelier'], dtype=object),\n",
       " array(['light bulb', 'lightning', 'flashlight'], dtype=object),\n",
       " array(['spider', 'octopus', 'lantern'], dtype=object),\n",
       " array(['house plant', 'garden', 'garden hose'], dtype=object),\n",
       " array(['banana', 'dolphin', 'parrot'], dtype=object),\n",
       " array(['ear', 'face', 'headphones'], dtype=object),\n",
       " array(['wine glass', 'wine bottle', 'cup'], dtype=object),\n",
       " array(['candle', 'marker', 'lipstick'], dtype=object),\n",
       " array(['piano', 'bench', 'keyboard'], dtype=object),\n",
       " array(['knee', 'waterslide', 'banana'], dtype=object),\n",
       " array(['drums', 'trombone', 'lighthouse'], dtype=object),\n",
       " array(['couch', 'van', 'bus'], dtype=object),\n",
       " array(['sleeping bag', 'passport', 'matches'], dtype=object),\n",
       " array(['The Eiffel Tower', 'skyscraper', 'lighthouse'], dtype=object),\n",
       " array(['bed', 'calculator', 'spreadsheet'], dtype=object),\n",
       " array(['sock', 'leg', 'knee'], dtype=object),\n",
       " array(['see saw', 'diving board', 'cannon'], dtype=object),\n",
       " array(['sandwich', 'beard', 'bread'], dtype=object),\n",
       " array(['horse', 'zebra', 'giraffe'], dtype=object),\n",
       " array(['helmet', 'hat', 'brain'], dtype=object),\n",
       " array(['zebra', 'raccoon', 'horse'], dtype=object),\n",
       " array(['steak', 'peanut', 'keyboard'], dtype=object),\n",
       " array(['tiger', 'zebra', 'raccoon'], dtype=object),\n",
       " array(['sock', 'shoe', 'toilet'], dtype=object),\n",
       " array(['calendar', 'map', 'passport'], dtype=object),\n",
       " array(['hammer', 'broom', 'rake'], dtype=object),\n",
       " array(['snail', 'nail', 'baseball bat'], dtype=object),\n",
       " array(['golf club', 'hockey stick', 'streetlight'], dtype=object),\n",
       " array(['face', 'smiley face', 'hat'], dtype=object),\n",
       " array(['cat', 'tiger', 'owl'], dtype=object),\n",
       " array(['square', 'door', 'dishwasher'], dtype=object),\n",
       " array(['coffee cup', 'mug', 'cup'], dtype=object),\n",
       " array(['snowflake', 'spider', 'fan'], dtype=object),\n",
       " array(['lantern', 'fire hydrant', 'floor lamp'], dtype=object),\n",
       " array(['spider', 'crab', 'octopus'], dtype=object),\n",
       " array(['strawberry', 'blueberry', 'blackberry'], dtype=object),\n",
       " array(['trumpet', 'trombone', 'saxophone'], dtype=object),\n",
       " array(['elbow', 'knee', 'arm'], dtype=object),\n",
       " array(['waterslide', 'yoga', 'diving board'], dtype=object),\n",
       " array(['beach', 'ocean', 'river'], dtype=object),\n",
       " array(['candle', 'marker', 'matches'], dtype=object),\n",
       " array(['school bus', 'bus', 'firetruck'], dtype=object),\n",
       " array(['coffee cup', 'teapot', 'cup'], dtype=object),\n",
       " array(['peas', 'string bean', 'bread'], dtype=object),\n",
       " array(['firetruck', 'pickup truck', 'fire hydrant'], dtype=object),\n",
       " array(['toaster', 'cooler', 'mouse'], dtype=object),\n",
       " array(['fireplace', 'stove', 'oven'], dtype=object),\n",
       " array(['boomerang', 'pliers', 'elbow'], dtype=object),\n",
       " array(['ant', 'lobster', 'scorpion'], dtype=object),\n",
       " array(['kangaroo', 'rabbit', 'squirrel'], dtype=object),\n",
       " array(['motorbike', 'car', 'binoculars'], dtype=object),\n",
       " array(['clarinet', 'trumpet', 'trombone'], dtype=object),\n",
       " array(['candle', 'chandelier', 'marker'], dtype=object),\n",
       " array(['power outlet', 'cooler', 'stereo'], dtype=object),\n",
       " array(['foot', 'arm', 'toe'], dtype=object),\n",
       " array(['steak', 'shoe', 'sandwich'], dtype=object),\n",
       " array(['cactus', 'house plant', 'flower'], dtype=object),\n",
       " array(['cell phone', 'telephone', 'remote control'], dtype=object),\n",
       " array(['skateboard', 'rollerskates', 'diving board'], dtype=object),\n",
       " array(['hockey puck', 'hot tub', 'bathtub'], dtype=object),\n",
       " array(['steak', 'harp', 'pool'], dtype=object),\n",
       " array(['table', 'chair', 'bench'], dtype=object),\n",
       " array(['panda', 'raccoon', 'teddy-bear'], dtype=object),\n",
       " array(['sweater', 'jacket', 't-shirt'], dtype=object),\n",
       " array(['goatee', 'beard', 'face'], dtype=object),\n",
       " array(['spider', 'mosquito', 'ant'], dtype=object),\n",
       " array(['bat', 'owl', 'bird'], dtype=object),\n",
       " array(['cruise ship', 'speedboat', 'sailboat'], dtype=object),\n",
       " array(['trumpet', 'trombone', 'clarinet'], dtype=object),\n",
       " array(['lighthouse', 'lantern', 'streetlight'], dtype=object),\n",
       " array(['cannon', 'canoe', 'tractor'], dtype=object),\n",
       " array(['dresser', 'oven', 'cooler'], dtype=object),\n",
       " array(['tiger', 'cat', 'raccoon'], dtype=object),\n",
       " array(['grapes', 'blackberry', 'blueberry'], dtype=object),\n",
       " array(['fan', 'cooler', 'ceiling fan'], dtype=object),\n",
       " array(['octopus', 'octagon', 'spider'], dtype=object),\n",
       " array(['snail', 'nail', 'butterfly'], dtype=object),\n",
       " array(['teddy-bear', 'panda', 'bear'], dtype=object),\n",
       " array(['sock', 'shoe', 'flip flops'], dtype=object),\n",
       " array(['school bus', 'bus', 'van'], dtype=object),\n",
       " array(['skyscraper', 'ladder', 'The Eiffel Tower'], dtype=object),\n",
       " array(['crab', 'lobster', 'scorpion'], dtype=object),\n",
       " array(['camel', 'bear', 'elephant'], dtype=object),\n",
       " array(['bird', 'parrot', 'duck'], dtype=object),\n",
       " array(['brain', 'camouflage', 'helmet'], dtype=object),\n",
       " array(['backpack', 'penguin', 'dog'], dtype=object),\n",
       " array(['ear', 'toe', 'elephant'], dtype=object),\n",
       " array(['grapes', 'blackberry', 'blueberry'], dtype=object),\n",
       " array(['watermelon', 'pizza', 'strawberry'], dtype=object),\n",
       " array(['calendar', 'keyboard', 'calculator'], dtype=object),\n",
       " array(['envelope', 'postcard', 'mailbox'], dtype=object),\n",
       " array(['stairs', 'squiggle', 'ladder'], dtype=object),\n",
       " array(['traffic light', 'streetlight', 'stop sign'], dtype=object),\n",
       " array(['dolphin', 'shark', 'whale'], dtype=object),\n",
       " array(['dresser', 'cooler', 'oven'], dtype=object),\n",
       " array(['asparagus', 'matches', 'pliers'], dtype=object),\n",
       " array(['dumbbell', 'binoculars', 'eyeglasses'], dtype=object),\n",
       " array(['speedboat', 'cruise ship', 'sailboat'], dtype=object),\n",
       " array(['flashlight', 'trumpet', 'megaphone'], dtype=object),\n",
       " array(['stethoscope', 'headphones', 'saxophone'], dtype=object),\n",
       " array(['vase', 'hot air balloon', 'pear'], dtype=object),\n",
       " array(['mermaid', 'The Mona Lisa', 'dresser'], dtype=object),\n",
       " array(['bowtie', 'butterfly', 'bat'], dtype=object),\n",
       " array(['teapot', 'purse', 'coffee cup'], dtype=object),\n",
       " array(['hedgehog', 'spider', 'lobster'], dtype=object),\n",
       " array(['cruise ship', 'speedboat', 'sailboat'], dtype=object),\n",
       " array(['snorkel', 'radio', 'binoculars'], dtype=object),\n",
       " array(['cruise ship', 'speedboat', 'hot dog'], dtype=object),\n",
       " array(['strawberry', 'blackberry', 'blueberry'], dtype=object),\n",
       " array(['hot air balloon', 'parachute', 'light bulb'], dtype=object),\n",
       " array(['chair', 'diving board', 'axe'], dtype=object),\n",
       " array(['key', 'saw', 'see saw'], dtype=object),\n",
       " array(['barn', 'house', 'church'], dtype=object),\n",
       " array(['binoculars', 'snorkel', 'tractor'], dtype=object),\n",
       " array(['radio', 'stereo', 'steak'], dtype=object),\n",
       " array(['canoe', 'speedboat', 'bathtub'], dtype=object),\n",
       " array(['key', 'toothbrush', 'bottlecap'], dtype=object),\n",
       " array(['dishwasher', 'oven', 'cooler'], dtype=object),\n",
       " array(['cat', 'raccoon', 'tiger'], dtype=object),\n",
       " array(['mouth', 'tooth', 'cruise ship'], dtype=object),\n",
       " array(['chair', 'toilet', 'bench'], dtype=object),\n",
       " array(['The Eiffel Tower', 'mountain', 'tent'], dtype=object),\n",
       " array(['square', 'suitcase', 'door'], dtype=object),\n",
       " array(['television', 'radio', 'computer'], dtype=object),\n",
       " array(['sock', 'shoe', 'rollerskates'], dtype=object),\n",
       " array(['watermelon', 'pizza', 'strawberry'], dtype=object),\n",
       " array(['ocean', 'river', 'squiggle'], dtype=object),\n",
       " array(['cup', 'paint can', 'coffee cup'], dtype=object),\n",
       " array(['t-shirt', 'sweater', 'jacket'], dtype=object),\n",
       " array(['feather', 'leaf', 'tennis racquet'], dtype=object),\n",
       " array(['flip flops', 'binoculars', 'toe'], dtype=object),\n",
       " array(['octagon', 'line', 'hexagon'], dtype=object),\n",
       " array(['hurricane', 'tornado', 'hamburger'], dtype=object),\n",
       " array(['bridge', 'mountain', 'roller coaster'], dtype=object),\n",
       " array(['banana', 'pliers', 'chair'], dtype=object),\n",
       " array(['leg', 'knee', 'foot'], dtype=object),\n",
       " array(['postcard', 'passport', 'microwave'], dtype=object),\n",
       " array(['speedboat', 'toothpaste', 'cruise ship'], dtype=object),\n",
       " array(['smiley face', 'helmet', 'face'], dtype=object),\n",
       " array(['bottlecap', 'drums', 'hot tub'], dtype=object),\n",
       " array(['elbow', 'arm', 'knee'], dtype=object),\n",
       " array(['rabbit', 'mouse', 'dog'], dtype=object),\n",
       " array(['tree', 'broccoli', 'foot'], dtype=object),\n",
       " array(['stove', 'oven', 'microwave'], dtype=object),\n",
       " array(['tractor', 'ambulance', 'firetruck'], dtype=object),\n",
       " array(['crayon', 'marker', 'pencil'], dtype=object),\n",
       " array(['calendar', 'marker', 'passport'], dtype=object),\n",
       " array(['snail', 'nail', 'bee'], dtype=object),\n",
       " array(['envelope', 'cooler', 'postcard'], dtype=object),\n",
       " array(['fan', 'microphone', 'camouflage'], dtype=object),\n",
       " array(['tiger', 'raccoon', 'cat'], dtype=object),\n",
       " array(['chair', 'bench', 'bed'], dtype=object),\n",
       " array(['lion', 'hedgehog', 'tiger'], dtype=object),\n",
       " array(['coffee cup', 'cup', 'mug'], dtype=object),\n",
       " array(['door', 'barn', 'lighthouse'], dtype=object),\n",
       " array(['nose', 'boomerang', 'moustache'], dtype=object),\n",
       " array(['snowflake', 'wheel', 'compass'], dtype=object),\n",
       " array(['paper clip', 'trombone', 'ear'], dtype=object),\n",
       " array(['hammer', 'axe', 'trombone'], dtype=object),\n",
       " array(['hockey stick', 'golf club', 'hockey puck'], dtype=object),\n",
       " array(['bracelet', 'necklace', 'skateboard'], dtype=object),\n",
       " array(['bed', 'spreadsheet', 'sleeping bag'], dtype=object),\n",
       " array(['stairs', 'squiggle', 'zigzag'], dtype=object),\n",
       " array(['watermelon', 'pizza', 'diamond'], dtype=object),\n",
       " array(['washing machine', 'dishwasher', 'oven'], dtype=object),\n",
       " array(['pants', 'shorts', 'jacket'], dtype=object),\n",
       " array(['frying pan', 'steak', 'stove'], dtype=object),\n",
       " array(['crown', 'pants', 'fireplace'], dtype=object),\n",
       " array(['calendar', 'passport', 'spreadsheet'], dtype=object),\n",
       " array(['radio', 'stereo', 'television'], dtype=object),\n",
       " array(['goatee', 'beard', 'face'], dtype=object),\n",
       " array(['church', 'hospital', 'lantern'], dtype=object),\n",
       " array(['apple', 'pear', 'blueberry'], dtype=object),\n",
       " array(['windmill', 'palm tree', 'lighthouse'], dtype=object),\n",
       " array(['windmill', 'church', 'lighthouse'], dtype=object),\n",
       " array(['bear', 'panda', 'monkey'], dtype=object),\n",
       " array(['calendar', 'calculator', 'spreadsheet'], dtype=object),\n",
       " array(['spider', 'mosquito', 'ant'], dtype=object),\n",
       " array(['underwear', 'anvil', 'canoe'], dtype=object),\n",
       " array(['hat', 'nose', 'dumbbell'], dtype=object),\n",
       " array(['hourglass', 'vase', 'peanut'], dtype=object),\n",
       " array(['finger', 'toe', 'nail'], dtype=object),\n",
       " array(['ear', 'telephone', 'paper clip'], dtype=object),\n",
       " array(['flying saucer', 'bracelet', 'necklace'], dtype=object),\n",
       " array(['The Great Wall of China', 'castle', 'fence'], dtype=object),\n",
       " array(['The Eiffel Tower', 'skyscraper', 'ladder'], dtype=object),\n",
       " array(['elbow', 'arm', 'knee'], dtype=object),\n",
       " array(['toothpaste', 'marker', 'toothbrush'], dtype=object),\n",
       " array(['floor lamp', 'shovel', 'lantern'], dtype=object),\n",
       " array(['strawberry', 'blueberry', 'blackberry'], dtype=object),\n",
       " array(['shovel', 'dumbbell', 'rake'], dtype=object),\n",
       " array(['bowtie', 'butterfly', 'bat'], dtype=object),\n",
       " ...]"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pred_label"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-13T01:36:17.704517Z",
     "start_time": "2018-11-13T01:36:17.694556Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[237, 284,  32],\n",
       "       [147,  39, 229],\n",
       "       [  1,  65, 113],\n",
       "       ...,\n",
       "       [238,  76, 228],\n",
       "       [ 42, 228,  50],\n",
       "       [ 70, 310,  27]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pred_label"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-14T01:27:46.090066Z",
     "start_time": "2018-11-14T01:27:45.770943Z"
    }
   },
   "outputs": [],
   "source": [
    "import torch"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-14T01:27:47.151165Z",
     "start_time": "2018-11-14T01:27:47.128218Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "torch.backends.cudnn.enabled"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
